Skip to content
Snippets Groups Projects
Unverified Commit 5ddb9185 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Fix #50

parent 24405010
No related branches found
No related tags found
No related merge requests found
......@@ -467,11 +467,11 @@ class Schedule(models.Model):
rrule = RRule.objects.get(pk=int(sdl['rrule']))
show = Show.objects.get(pk=int(show_pk))
is_repetition = True if 'is_repetition' in sdl and sdl['is_repetition'] == 'true' else False
is_repetition = True if 'is_repetition' in sdl and sdl['is_repetition'] is True else False
fallback_id = int(sdl['fallback_id']) if sdl['fallback_id'] else None
automation_id = int(sdl['automation_id']) if sdl['automation_id'] else None
add_days_no = int(sdl['add_days_no']) if sdl['add_days_no'] > 0 else None
add_business_days_only = True if sdl['add_business_days_only'] == 'true' else False
add_business_days_only = True if 'add_business_days_only' in sdl and sdl['add_business_days_only'] is True else False
dstart = datetime.strptime(str(sdl['dstart']), '%Y-%m-%d').date()
......@@ -1182,7 +1182,7 @@ class TimeSlot(models.Model):
def __str__(self):
start = self.start.strftime('%a, %d.%m.%Y %H:%M')
end = self.end.strftime('%H:%M')
is_repetition = ' ' + _('(REP)') if self.schedule.is_repetition == 1 else ''
is_repetition = ' ' + _('(REP)') if self.schedule.is_repetition is True else ''
return '%s - %s %s (%s)' % (start, end, is_repetition, self.show.name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment