# 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 0a6d5cf19b
commit 298a632cac
13 changed files with 56 additions and 26 deletions

View File

@@ -17,7 +17,7 @@ from konova.utils.documents import remove_document, get_document
from konova.utils.generators import generate_qr_code
from konova.utils.message_templates import INTERVENTION_INVALID, FORM_INVALID, IDENTIFIER_REPLACED, \
CHECKED_RECORDED_RESET, DEDUCTION_REMOVED, DEDUCTION_ADDED, REVOCATION_ADDED, REVOCATION_REMOVED, \
COMPENSATION_REMOVED_TEMPLATE
COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED
from konova.utils.user_checks import in_group
@@ -131,7 +131,7 @@ def new_document_view(request: HttpRequest, id: str):
form = NewInterventionDocumentForm(request.POST or None, request.FILES or None, instance=intervention, request=request)
return form.process_request(
request,
msg_success=_("Document added"),
msg_success=DOCUMENT_ADDED,
redirect_url=reverse("intervention:detail", args=(id,)) + "#related_data"
)