HOTFIX: Migrated revocation

* adds handling for error raising if migrated revocation document missing, due to no existing document at all
pull/279/head
mpeltriaux 2 years ago
parent 87b2e79389
commit 5008bdaaf0

@ -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()
self.save()

Loading…
Cancel
Save