fixed test case. fixed bug with the decryption logic.

This commit is contained in:
jonaswinkler
2020-12-09 13:27:02 +01:00
parent 0a0d462938
commit 2be0ba9f72
4 changed files with 19 additions and 22 deletions

View File

@@ -82,7 +82,8 @@ class Command(BaseCommand):
with open(document.thumbnail_path, "wb") as f:
f.write(raw_thumb)
document.save(update_fields=("storage_type", "filename"))
Document.objects.filter(id=document.id).update(
storage_type=document.storage_type, filename=document.filename)
for path in old_paths:
os.unlink(path)