From 10fc80d9be0dfce6071b47fbd97c542e92ad9954 Mon Sep 17 00:00:00 2001 From: bkfox Date: Wed, 11 Jan 2017 10:35:06 +0100 Subject: [PATCH] fix bug when saving diff pointing to initial diff --- aircox/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aircox/models.py b/aircox/models.py index a7bbd6d..fcf91ff 100755 --- a/aircox/models.py +++ b/aircox/models.py @@ -727,7 +727,8 @@ class Schedule(models.Model): if self.initial: self.program = self.initial.program self.duration = self.initial.duration - self.frequency = self.initial.frequency + if not self.frequency: + self.frequency = self.initial.frequency super().save(*args, **kwargs) class Meta: