Commit e8cd54a9 authored by fred's avatar fred

add jingle_id properties to occurence slots

parent 913f8462
......@@ -306,6 +306,10 @@ class RecurringStreamOccurence(models.Model):
diffusion = models.ForeignKey(RecurringStreamDiffusion, on_delete=models.CASCADE)
datetime = models.DateTimeField(_('Date/time'), db_index=True)
@property
def jingle_id(self):
return self.diffusion.jingle_id
@property
def duration(self):
return self.diffusion.schedule.get_duration() * 60
......@@ -341,6 +345,10 @@ class RecurringRandomDirectoryOccurence(models.Model):
diffusion = models.ForeignKey(RecurringRandomDirectoryDiffusion, on_delete=models.CASCADE)
datetime = models.DateTimeField(_('Date/time'), db_index=True)
@property
def jingle_id(self):
return self.diffusion.jingle_id
@property
def duration(self):
return self.diffusion.schedule.get_duration() * 60
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment