fix migration and more tests

This commit is contained in:
jonaswinkler
2021-02-09 20:54:02 +01:00
parent ee9a73aa95
commit a1293c77b9
2 changed files with 25 additions and 10 deletions

View File

@@ -192,7 +192,7 @@ def move_old_to_new_locations(apps, schema_editor):
os.unlink(old_path)
else:
# Set archive path for unaffected files
doc.archive_filename = archive_path_old(doc)
doc.archive_filename = archive_name_from_filename(doc.filename)
Document.objects.filter(id=doc.id).update(
archive_filename=doc.archive_filename
)