From a1b0340437012d6800c0ab6ccc15e52a2a6e078b Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Mon, 19 Feb 2024 10:22:01 +0100 Subject: [PATCH] Fix code style --- pretalx_media_ccc_de/forms.py | 4 ++-- pretalx_media_ccc_de/models.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pretalx_media_ccc_de/forms.py b/pretalx_media_ccc_de/forms.py index ebe6694..c56a5ea 100644 --- a/pretalx_media_ccc_de/forms.py +++ b/pretalx_media_ccc_de/forms.py @@ -23,10 +23,10 @@ def __init__(self, *args, **kwargs): class MediaCCCDeUrlForm(forms.Form): def __init__(self, *args, event=None, **kwargs): - if not event or not event.current_schedule: - return super().__init__(*args, **kwargs) self.event = event super().__init__(*args, **kwargs) + if not event or not event.current_schedule: + return self.talks = ( event.current_schedule.talks.all() diff --git a/pretalx_media_ccc_de/models.py b/pretalx_media_ccc_de/models.py index 0a8ae32..1d5a3d7 100644 --- a/pretalx_media_ccc_de/models.py +++ b/pretalx_media_ccc_de/models.py @@ -20,9 +20,9 @@ def serialize(self): return { "submission": self.submission.code, "url": self.url, - "release_date": self.release_date.isoformat() - if self.release_date - else None, + "release_date": ( + self.release_date.isoformat() if self.release_date else None + ), "duration_seconds": self.duration_seconds, "thumbnail_url": self.thumbnail_url, }