# 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

@@ -283,6 +283,15 @@ class RecordableObjectMixin(models.Model):
CHECKED_RECORDED_RESET
)
@abstractmethod
def is_ready_for_publish(self) -> bool:
""" Check for all needed publishing-constraints on the data
Returns:
is_ready (bool): True|False
"""
raise NotImplementedError("Implement this in the subclass!")
class CheckableObjectMixin(models.Model):
# Checks - Refers to "Genehmigen" but optional