# 83 Publication rework interventions

* adds abstract is_ready_for_publish method to PublishableObjectMixin which needs to be implemented in subclasses
* adds implementation for intervention model
* adds publishable check to rendering report view
* adds/updates translations
This commit is contained in:
2022-01-21 09:02:56 +01:00
parent 1670bf37ab
commit b72426e20f
5 changed files with 30 additions and 3 deletions

View File

@@ -545,7 +545,7 @@ def report_view(request:HttpRequest, id: str):
tab_title = _("Report {}").format(intervention.identifier)
# If intervention is not recorded (yet or currently) we need to render another template without any data
if not intervention.recorded:
if not intervention.is_ready_for_publish():
template = "report/unavailable.html"
context = {
TAB_TITLE_IDENTIFIER: tab_title,