Unit test compensation models
* adds unit tests for compensation models * removes duplicated unit tests
This commit is contained in:
@@ -419,8 +419,11 @@ class InterventionDocument(AbstractDocument):
|
||||
# The only file left for this intervention is the one which is currently processed and will be deleted
|
||||
# Make sure that the intervention folder itself is deleted as well, not only the file
|
||||
# Therefore take the folder path from the file path
|
||||
folder_path = self.file.path.split("/")[:-1]
|
||||
folder_path = "/".join(folder_path)
|
||||
try:
|
||||
folder_path = self.file.path.split("/")[:-1]
|
||||
folder_path = "/".join(folder_path)
|
||||
except ValueError:
|
||||
folder_path = None
|
||||
|
||||
if user:
|
||||
self.instance.mark_as_edited(user, edit_comment=DOCUMENT_REMOVED_TEMPLATE.format(self.title))
|
||||
|
||||
Reference in New Issue
Block a user