Log not existing source pre save

I think this is not only possible, but happens regularly.
This commit is contained in:
tcely 2025-02-22 07:05:44 -05:00 committed by GitHub
parent 1f0169ae4b
commit b5dcf41097
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ def source_pre_save(sender, instance, **kwargs):
try:
existing_source = Source.objects.get(pk=instance.pk)
except Source.DoesNotExist:
# Probably not possible?
log.debug(f'source_pre_save signal: no existing source: {sender} - {instance}')
return
existing_dirpath = existing_source.directory_path.resolve(strict=True)
new_dirpath = instance.directory_path.resolve(strict=False)