web/views/editforms.py
branchtls-sprint
changeset 1750 9df5e65c5f79
parent 1710 8c717cc0b353
child 1759 61d026ced19f
equal deleted inserted replaced
1749:b61dc3e5dca5 1750:9df5e65c5f79
   338 
   338 
   339     def keep_entity(self, form, entity, peid, rtype):
   339     def keep_entity(self, form, entity, peid, rtype):
   340         if not entity.has_eid():
   340         if not entity.has_eid():
   341             return True
   341             return True
   342         # are we regenerating form because of a validation error ?
   342         # are we regenerating form because of a validation error ?
   343         if erroneous_post:
   343         if form.form_previous_values:
   344             cdvalues = self.req.list_form_param(eid_param(rtype, peid),
   344             cdvalues = self.req.list_form_param(eid_param(rtype, peid),
   345                                                 form.form_previous_values)
   345                                                 form.form_previous_values)
   346             if unicode(entity.eid) not in cdvalues:
   346             if unicode(entity.eid) not in cdvalues:
   347                 return False
   347                 return False
   348         return True
   348         return True