Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: always use source_filename attribute when accessing a file

Wolf-Bastian Poettner4fc1e67e9bdb
diff --git a/src/documents/models.py b/src/documents/models.py
index 9e57b7e7f..b81b4d42d 100644
--- a/src/documents/models.py
+++ b/src/documents/models.py
@@ -436,7 +436,7 @@ def update_filename(sender, instance, **kwargs):
instance.create_source_directory()
# Determine the full "current" path
- path_current = instance.filename_to_path(instance.filename)
+ path_current = instance.filename_to_path(instance.source_filename)
# Move file
try: