web/views/forms.py
branchstable
changeset 3517 8832e231fad7
parent 3516 5f18e71e3d42
child 3524 a3431f4e2f40
child 3689 deb13e88e037
equal deleted inserted replaced
3516:5f18e71e3d42 3517:8832e231fad7
   303             value = self.edited_entity.linked_to(field.name, field.role)
   303             value = self.edited_entity.linked_to(field.name, field.role)
   304             if value:
   304             if value:
   305                 searchedvalues = ['%s:%s:%s' % (field.name, eid, field.role)
   305                 searchedvalues = ['%s:%s:%s' % (field.name, eid, field.role)
   306                                   for eid in value]
   306                                   for eid in value]
   307                 # remove associated __linkto hidden fields
   307                 # remove associated __linkto hidden fields
   308                 for field in self.fields_by_name('__linkto'):
   308                 for field in self.root_form.fields_by_name('__linkto'):
   309                     if field.initial in searchedvalues:
   309                     if field.initial in searchedvalues:
   310                         self.remove_field(field)
   310                         self.root_form.remove_field(field)
   311             else:
   311             else:
   312                 value = None
   312                 value = None
   313         return value
   313         return value
   314 
   314 
   315     def _form_field_default_value(self, field, load_bytes):
   315     def _form_field_default_value(self, field, load_bytes):