actes: an act is saved only if its event is not canceled

Closes #4075
This commit is contained in:
Serghei Mihai 2014-07-01 14:13:02 +02:00
parent a142f55118
commit c4d2d185cb
1 changed files with 2 additions and 1 deletions

View File

@ -221,7 +221,8 @@ class Act(models.Model):
# END Specific to sessad healthcare
def save(self, *args, **kwargs):
super(Act, self).save(*args, **kwargs)
if self.parent_event and not self.parent_event.canceled:
super(Act, self).save(*args, **kwargs)
def duration(self):
'''Return a displayable duration for this field.'''