From 302705325686e6ec49430d9f4dcf9e470dd79243 Mon Sep 17 00:00:00 2001 From: Wolf-Bastian Poettner Date: Sat, 1 Feb 2020 14:12:58 +0000 Subject: [PATCH] Added comment to update_document --- src/documents/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/documents/models.py b/src/documents/models.py index 65beb80d4..359960846 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -409,6 +409,7 @@ def delete_empty_directory(directory): @receiver(models.signals.m2m_changed, sender=Document.tags.through) @receiver(models.signals.post_save, sender=Document) def update_filename(sender, instance, **kwargs): + # Skip if document has not been saved yet if instance.filename is None: return