# 83 Publication rework

* adds fake-inherited is_ready_for_publish() method to compensation model (not derived from RecordableObjectMixin) to equalize usage of is_ready_for_publish() usage for all data types (compensation can be checked the same way as intervention, ecoaccount or ema)
This commit is contained in:
2022-01-21 09:26:41 +01:00
parent 469dabf6aa
commit 4e57ca4954
2 changed files with 11 additions and 1 deletions

View File

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