# 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:
@@ -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)
|
||||
)
|
||||
@@ -37,6 +37,10 @@ PAYMENT_REMOVED = _("Payment removed")
|
||||
REVOCATION_ADDED = _("Revocation added")
|
||||
REVOCATION_REMOVED = _("Revocation removed")
|
||||
|
||||
# DOCUMENTS
|
||||
DOCUMENT_REMOVED_TEMPLATE = _("Document '{}' deleted")
|
||||
DOCUMENT_ADDED = _("Document added")
|
||||
|
||||
# Edited
|
||||
EDITED_GENERAL_DATA = _("Edited general data")
|
||||
ADDED_COMPENSATION_STATE = _("Added compensation state")
|
||||
|
||||
Reference in New Issue
Block a user