HOTFIX: Migrated revocation

* adds handling for error raising if migrated revocation document missing, due to no existing document at all
This commit is contained in:
mpeltriaux 2022-12-14 16:36:21 +01:00
parent 87b2e79389
commit 5008bdaaf0

View File

@ -87,7 +87,7 @@ class AbstractDocument(BaseResource):
"""
try:
os.remove(self.file.file.name)
except FileNotFoundError:
except (FileNotFoundError, ValueError):
# File seems to missing anyway - continue!
pass
super().delete(using=using, keep_parents=keep_parents)
@ -113,7 +113,7 @@ class AbstractDocument(BaseResource):
"""
try:
os.remove(self.file.file.name)
except FileNotFoundError:
except (FileNotFoundError, ValueError):
pass
self.file = new_file
self.save()