summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-03-21 16:01:22 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2011-03-21 16:01:22 (GMT)
commit9c79e5a97ddd46953a250f25754b77bdec1cff80 (patch)
tree0dbffd2cc679ad2763b2f3c38fc313da08939d81
parent35c96f7db9a7d3199fc8e62f74bf29f407cf3918 (diff)
fixed save methods.
-rw-r--r--program/models.py9
1 files changed, 3 insertions, 6 deletions
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)