Commit 76a3a1c7 authored by fred's avatar fred

make end_datetime a property

parent 72e807db
......@@ -268,6 +268,7 @@ class Schedule(models.Model, WeekdayMixin):
else:
return self.emission.duration
@property
def end_datetime(self):
return self.datetime + datetime.timedelta(minutes=self.get_duration())
......@@ -445,6 +446,7 @@ class Diffusion(models.Model, WeekdayMixin):
def get_duration(self):
return self.episode.get_duration()
@property
def end_datetime(self):
return self.datetime + datetime.timedelta(minutes=self.get_duration())
......
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