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