diff --git a/opentech/apply/funds/models.py b/opentech/apply/funds/models.py index a4a3fe601fdaac8a226aa185954e4c195e72ca24..47ce6c9680122224ab6c5cd6e1a11543321eee4f 100644 --- a/opentech/apply/funds/models.py +++ b/opentech/apply/funds/models.py @@ -275,10 +275,16 @@ class Round(WorkflowStreamForm, SubmittableStreamForm): ObjectList(SubmittableStreamForm.promote_panels, heading='Promote'), ]) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # We attached the parent page as part of the before_create_hook + if hasattr(self, 'parent_page'): + self.workflow = self.parent_page.workflow + def save(self, *args, **kwargs): is_new = not self.id if is_new and hasattr(self, 'parent_page'): - # We attached the parent page as part of the before_create_hook + # Ensure that the workflow hasn't changed self.workflow = self.parent_page.workflow super().save(*args, **kwargs)