Commit 2007c22a authored by MOREAU Ulysse's avatar MOREAU Ulysse
Browse files

fix mypy : Item "None" of "Optional[datetime]" has no attribute "astimezone"

parent 5a965045
......@@ -62,7 +62,7 @@ class Command(BaseCommand):
e.end_inscriptions = e.end_inscriptions.astimezone(localtz).replace(
hour=rec_event.end_inscriptions.astimezone(localtz).hour
)
if e.invitations_start is not None:
if e.invitations_start is not None and rec_event.invitations_start is not None:
e.invitations_start = e.invitations_start.astimezone(
localtz
).replace(hour=rec_event.invitations_start.astimezone(localtz).hour)
......
Supports Markdown
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