Browse Source

[#11] Modification du passage d'arguments sur la méthode create de components

Roland Haroutiounian 10 years ago
parent
commit
6442a85014
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      EditorialModel/fields.py

+ 4
- 1
EditorialModel/fields.py View File

@@ -57,7 +57,7 @@ class EmField(EmComponent):
57 57
                 'internal' : 1 if internal else 0,
58 58
             }
59 59
 
60
-            createdField = super(EmField,c).create(values)
60
+            createdField = super(EmField,c).create(**values)
61 61
             if createdField:
62 62
                 # The field was created, we then add its column in the corresponding class' table
63 63
                 is_field_column_added = EmField.addFieldColumnToClassTable(createdField)
@@ -154,3 +154,6 @@ class EmField(EmComponent):
154 154
         }
155 155
 
156 156
         return super(EmField, self).save(values)
157
+
158
+class EmFieldNotExistError(Exception):
159
+    pass

Loading…
Cancel
Save