mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 22:23:23 +00:00
Merge branch 'bugfix-110-ClubSellings' into 'master'
Fix error 500 in club sellings Closes #110 See merge request ae/Sith!289
This commit is contained in:
commit
9177c9d4c2
@ -410,8 +410,9 @@ class TzAwareDateTimeField(forms.DateTimeField):
|
||||
if isinstance(value, str):
|
||||
# convert it into a naive datetime (no timezone attached)
|
||||
value = parse_datetime(value)
|
||||
# attach it to the UTC timezone (so that to_current_timezone()
|
||||
# attach it to the UTC timezone (so that to_current_timezone()) if not None
|
||||
# converts it to the local timezone)
|
||||
if value is not None:
|
||||
value = timezone.make_aware(value, timezone.utc)
|
||||
|
||||
if isinstance(value, datetime.datetime):
|
||||
|
Loading…
Reference in New Issue
Block a user