prieto 7 years ago
parent
commit
43bf90d1ca

+ 2
- 2
lodel/leapi/datahandlers/base_classes.py View File

@@ -396,8 +396,8 @@ class MultipleRef(Reference):
396 396
             except (FieldValidationError) as f:
397 397
                 error_list.append(repr(v))
398 398
         logger.warning("Provisoire pour faire les tests, à fixer")
399
-        #if (len(error_list) > 0):
400
-        #    raise FieldValidationError("MultipleRef have for invalid values [%s]  :" % (",".join(error_list)))
399
+        if (len(error_list) > 0):
400
+            raise FieldValidationError("MultipleRef have for invalid values [%s]  :" % (",".join(error_list)))
401 401
         return new_val
402 402
 
403 403
     def construct_data(self, emcomponent, fname, datas, cur_value):

+ 2
- 1
plugins/webui/interface/controllers/admin.py View File

@@ -144,7 +144,6 @@ def admin_create(request):
144 144
             # The classname is handled by the datasource, we are not allowed to modify it
145 145
             # both are hidden in the form, to identify the object here
146 146
              if in_put != 'classname' and in_value != '':
147
-                fields[in_put[12:]] = in_value
148 147
                 dhl = target_leo.data_handler(in_put[12:])
149 148
                 if dhl.is_reference() and in_value != '':
150 149
                     logger.warning("Provisoire pour faire les tests, à fixer")
@@ -153,6 +152,8 @@ def admin_create(request):
153 152
                     for i in in_value:
154 153
                         l.append(int(i))
155 154
                     in_value=list(l)
155
+                fields[in_put[12:]] = in_value
156
+                
156 157
         # Insertion in the database of the values corresponding to a new object
157 158
         new_uid = target_leo.insert(fields)
158 159
         

Loading…
Cancel
Save