mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +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,9 +410,10 @@ 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)
|
||||
value = timezone.make_aware(value, timezone.utc)
|
||||
if value is not None:
|
||||
value = timezone.make_aware(value, timezone.utc)
|
||||
|
||||
if isinstance(value, datetime.datetime):
|
||||
value = to_current_timezone(value)
|
||||
|
Loading…
Reference in New Issue
Block a user