* fixes bug described in #328
This commit is contained in:
mpeltriaux 2023-04-26 11:28:46 +02:00
parent 57b734f1c2
commit a49c44ab44

View File

@ -79,6 +79,10 @@ class RevocationDocument(AbstractDocument):
# Remove the file itself # Remove the file itself
super().delete(*args, **kwargs) super().delete(*args, **kwargs)
if not self.file:
# If (for reasons) no file path has been added to the entry, we act as if the file did not exist
raise ObjectDoesNotExist
# Always remove 'revocation' folder if the one revocation we just processed is the only one left # Always remove 'revocation' folder if the one revocation we just processed is the only one left
folder_path = self.file.path.split("/") folder_path = self.file.path.split("/")
if revoc_docs.count() == 0: if revoc_docs.count() == 0: