From 9c79e5a97ddd46953a250f25754b77bdec1cff80 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Mon, 21 Mar 2011 17:01:22 +0100 Subject: fixed save methods. diff --git a/program/models.py b/program/models.py index 1355e5a..7aca5e9 100644 --- a/program/models.py +++ b/program/models.py @@ -236,9 +236,8 @@ class TimeSlot(models.Model): return u'%s: %s - %s' % (self.show, start, end) def save(self, *args, **kwargs): - super(TimeSlot, self).save(*args, **kwargs) - self.show = self.programslot.show + super(TimeSlot, self).save(*args, **kwargs) @models.permalink def get_absolute_url(self): @@ -257,7 +256,6 @@ class Note(models.Model): status = models.IntegerField(_("Status"), choices=STATUS_CHOICES, default=1) cba_entry_id = models.IntegerField(_("CBA entry ID"), blank=True, null=True) start = models.DateTimeField(editable=False) - end = models.DateTimeField(editable=False) show = models.ForeignKey(Show, editable=False) created = models.DateTimeField(auto_now_add=True, editable=False) last_updated = models.DateTimeField(auto_now=True, editable=False) @@ -271,8 +269,7 @@ class Note(models.Model): return u'%s - %s' % (self.title, self.timeslot) def save(self, *args, **kwargs): - super(Note, self).save(*args, **kwargs) - self.start = self.timeslot.start - self.end = self.timeslot.end self.show = self.timeslot.programslot.show + + super(Note, self).save(*args, **kwargs) -- cgit v0.10.2