From dbe965a97a360f9117d5d9ee429fd5229102f2a5 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Thu, 29 Dec 2011 01:43:02 -0400 Subject: fixed brown paper bug in save method. diff --git a/program/models.py b/program/models.py index eef98fa..cb52419 100644 --- a/program/models.py +++ b/program/models.py @@ -186,6 +186,8 @@ class ProgramSlot(models.Model): old = ProgramSlot.objects.get(pk=self.pk) if self.rrule != old.rrule or self.byweekday != old.byweekday or self.show != old.show or self.dstart != old.dstart or self.tstart != old.tstart or self.tend != old.tend or self.is_repetition != old.is_repetition: raise ValidationError(u"only until can be changed") + else: + old = False super(ProgramSlot, self).save(*args, **kwargs) @@ -224,7 +226,7 @@ class ProgramSlot(models.Model): bysetpos=self.rrule.bysetpos, byweekday=byweekday_end)) - if not self.pk: + if not old: for k in range(len(starts)): timeslot = TimeSlot.objects.create(programslot=self, start=starts[k], end=ends[k]) elif self.until > old.until: -- cgit v0.10.2