# 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user