From ec3607cf1f5286f5691ab5dc599bf8d076014b6d Mon Sep 17 00:00:00 2001 From: Wolf-Bastian Poettner Date: Sat, 1 Feb 2020 13:54:15 +0000 Subject: [PATCH] Removed duplicate check if instance.filename --- src/documents/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/documents/models.py b/src/documents/models.py index e37a4fbb5..65beb80d4 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -416,8 +416,7 @@ def update_filename(sender, instance, **kwargs): new_filename = instance.generate_source_filename() # If the filename is the same, then nothing needs to be done - if instance.filename is None or \ - instance.filename == new_filename: + if instance.filename == new_filename: return # Check if filename needs changing