# 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:
@@ -290,6 +290,16 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin):
|
||||
"""
|
||||
self.intervention.mark_as_edited(user, request, edit_comment)
|
||||
|
||||
def is_ready_for_publish(self) -> bool:
|
||||
""" Not inherited by RecordableObjectMixin
|
||||
|
||||
Simplifies same usage for compensations as for other datatypes
|
||||
|
||||
Returns:
|
||||
is_ready (bool): True|False
|
||||
"""
|
||||
return self.intervention.is_ready_for_publish()
|
||||
|
||||
|
||||
class CompensationDocument(AbstractDocument):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user