|
@@ -16,6 +16,12 @@ class EmFieldGroup(EmComponent):
|
16
|
16
|
## List of fields
|
17
|
17
|
_fields = [('class_id', ftypes.EmField_integer)]
|
18
|
18
|
|
|
19
|
+ ## Check if the EmFieldGroup is valid
|
|
20
|
+ # @return True if valid False if not
|
|
21
|
+ def check(self):
|
|
22
|
+ super(EmFieldGroup, self).check()
|
|
23
|
+ return True
|
|
24
|
+
|
19
|
25
|
## Deletes a fieldgroup
|
20
|
26
|
# @return True if the deletion is a success, False if not
|
21
|
27
|
def delete(self):
|
|
@@ -24,7 +30,10 @@ class EmFieldGroup(EmComponent):
|
24
|
30
|
if len(fieldgroup_fields) > 0:
|
25
|
31
|
raise NotEmptyError("This Fieldgroup still contains fields. It can't be deleted then")
|
26
|
32
|
# then we delete this fieldgroup
|
27
|
|
- return self.model.delete_component(self.uid)
|
|
33
|
+ if self.model.delete_component(self.uid):
|
|
34
|
+ return self.check()
|
|
35
|
+ else:
|
|
36
|
+ return False
|
28
|
37
|
|
29
|
38
|
## Get the list of associated fields
|
30
|
39
|
# if type_id, the fields will be filtered to represent selected fields of this EmType
|