#97: Schedule default timezone error + episode model tests (#98)

#97

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#98
This commit is contained in:
Thomas Kairos
2023-04-18 18:27:33 +02:00
parent cd19c26e82
commit 86b6a929be
3 changed files with 37 additions and 7 deletions

View File

@ -66,7 +66,7 @@ class Episode(Page):
)
@classmethod
def get_init_kwargs_from(cls, page, date, title=None, **kwargs):
def get_init_kwargs_from(cls, page, date=None, title=None, **kwargs):
"""Get default Episode's title."""
title = (
settings.EPISODE_TITLE.format(

View File

@ -49,7 +49,7 @@ class Schedule(Rerun):
)
timezone = models.CharField(
_("timezone"),
default=lambda: tz.get_current_timezone().zone,
default=lambda: tz.get_current_timezone().key,
max_length=100,
choices=[(x, x) for x in pytz.all_timezones],
help_text=_("timezone used for the date"),