# 86 More log details Documents

* adds more log details on adding/removing documents
* fixes bug in admin backend where restoring of non-compensation entries led to an error
* fixes bug where deleting of revocation without an attached file would lead to an error
This commit is contained in:
2022-02-04 09:18:46 +01:00
parent 6c80480d0d
commit fb8b338950
13 changed files with 56 additions and 26 deletions

View File

@@ -10,6 +10,7 @@ from django.utils.translation import gettext_lazy as _
from konova.forms import RemoveModalForm
from konova.models import AbstractDocument
from konova.utils.message_templates import DOCUMENT_REMOVED_TEMPLATE
def get_document(doc: AbstractDocument):
@@ -49,5 +50,5 @@ def remove_document(request: HttpRequest, doc: AbstractDocument):
form = RemoveModalForm(request.POST or None, instance=doc, request=request)
return form.process_request(
request=request,
msg_success=_("Document '{}' deleted").format(title)
msg_success=DOCUMENT_REMOVED_TEMPLATE.format(title)
)