branch | 3.24 |
changeset 11922 | 5f886dc718ab |
parent 11767 | 432f87a63057 |
child 11929 | fcbd6b251d81 |
--- a/cubicweb/web/formfields.py Thu Jan 26 16:33:15 2017 +0100 +++ b/cubicweb/web/formfields.py Thu Jan 26 16:34:56 2017 +0100 @@ -1027,6 +1027,8 @@ def _ensure_correctly_typed(self, form, value): tz_naive = super(TZDatetimeField, self)._ensure_correctly_typed( form, value) + if not tz_naive: + return None return tz_naive.replace(tzinfo=pytz.utc)