[controllers] fix bad if/elif switch in handle_attribute stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 11 Sep 2009 20:37:30 +0200
branchstable
changeset 3194 650637d4d764
parent 3193 c1a8456cb5f9
child 3196 77936fa67ae6
[controllers] fix bad if/elif switch in handle_attribute
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Fri Sep 11 19:51:09 2009 +0200
+++ b/web/views/editcontroller.py	Fri Sep 11 20:37:30 2009 +0200
@@ -248,7 +248,7 @@
                 except ValueError:
                     raise ValidationError(entity.eid,
                                           {attr: self.req._("invalid float value")})
-            if attrtype in ('Date', 'Datetime', 'Time'):
+            elif attrtype in ('Date', 'Datetime', 'Time'):
                 try:
                     value = self.parse_datetime(value, attrtype)
                 except ValueError: