You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for your hard work on django-timezone-field!
TimeZoneSerializerField.to_internal_value() seems not to fully handle the empty string ("") case.
With use_pytz=False, when the empty string is fed to the the method, it is passed to ZoneInfo(), which raises a ValueError, as follows:
Hi, thanks for your hard work on django-timezone-field!
TimeZoneSerializerField.to_internal_value()
seems not to fully handle the empty string ("") case.With
use_pytz=False
, when the empty string is fed to the the method, it is passed toZoneInfo()
, which raises aValueError
, as follows:I would expect
to_internal_value()
to raise aValidationError
instead, which could be handled appropriately by DRF's exception handling machinery.Please let me know if I can be of further help.
Thanks!
The text was updated successfully, but these errors were encountered: