Update current_cycle_state of animal when the cycle state is updated

This commit is contained in:
Guillem Barba 2016-09-20 11:58:38 +02:00
parent 15801d459b
commit 7a9cf64d3c
1 changed files with 2 additions and 0 deletions

View File

@ -668,6 +668,8 @@ class Female:
# called from cycle)
def update_state(self):
self.state = self.get_state()
self.current_cycle_state = (self.current_cycle.state
if self.current_cycle else None)
self.save()
return self.state