Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed forms.LocalizedDateTimeField to handle empty values correctly

  • Loading branch information...
commit 24cc54fbc1eeccc3b42af8c4e89f6a7d1e98a91e 1 parent fab9d64
@brosner authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  timezones/forms.py
View
2  timezones/forms.py
@@ -41,4 +41,6 @@ def __init__(self, timezone=None, *args, **kwargs):
def clean(self, value):
value = super(LocalizedDateTimeField, self).clean(value)
+ if value is None: # field was likely not required
+ return None
return adjust_datetime_to_timezone(value, from_tz=self.timezone)
Please sign in to comment.
Something went wrong with that request. Please try again.