Skip to content
Browse files

fixed forms.LocalizedDateTimeField to handle empty values correctly

  • Loading branch information...
1 parent fab9d64 commit 24cc54fbc1eeccc3b42af8c4e89f6a7d1e98a91e @brosner committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 timezones/
2 timezones/
@@ -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)

0 comments on commit 24cc54f

Please sign in to comment.
Something went wrong with that request. Please try again.