[mq]: fix_typo_and_forms
authorArthur Lutz <arthur.lutz@logilab.fr>
Wed, 09 Dec 2009 19:27:46 +0100
changeset 4101 7fa86fa51229
parent 4100 ca9e014012ef
child 4102 5ba6df5fcb07
[mq]: fix_typo_and_forms
web/formfields.py
web/views/forms.py
--- a/web/formfields.py	Wed Dec 09 19:27:24 2009 +0100
+++ b/web/formfields.py	Wed Dec 09 19:27:46 2009 +0100
@@ -506,7 +506,7 @@
         # but for some widgets, it might be simpler to return date objects
         # directly, so handle that case :
         if isinstance(date, basestring):
-            date = form.parse_datetime(wdgdate, 'Datetime')
+            date = form.parse_datetime(date, 'Datetime')
         return date
 
 class TimeField(DateField):
--- a/web/views/forms.py	Wed Dec 09 19:27:24 2009 +0100
+++ b/web/views/forms.py	Wed Dec 09 19:27:46 2009 +0100
@@ -455,7 +455,7 @@
         if field.is_visible():
             # fields not corresponding to an entity attribute / relations
             # are considered modified
-            if not field.eidparam:
+            if not field.eidparam or not self.edited_entity.has_eid():
                 return True # XXX
             try:
                 if field.role == 'subject':