|
@@ -53,6 +53,12 @@ class EmType(EmComponent):
|
53
|
53
|
def create(cls, name, em_class, sortcolumn='rank', **em_component_args):
|
54
|
54
|
return super(EmType, cls).create(name=name, class_id=em_class.uid, sortcolumn=sortcolumn, **em_component_args)
|
55
|
55
|
|
|
56
|
+ ## Checks if the EmType is valid
|
|
57
|
+ # @return Bool : True if valid, False if not
|
|
58
|
+ def check(self):
|
|
59
|
+ super(EmType, self).check()
|
|
60
|
+ return True
|
|
61
|
+
|
56
|
62
|
@property
|
57
|
63
|
## Return the EmClassType of the type
|
58
|
64
|
# @return EditorialModel.classtypes.*
|
|
@@ -79,7 +85,10 @@ class EmType(EmComponent):
|
79
|
85
|
for nature, sups in self.superiors().items():
|
80
|
86
|
for sup in sups:
|
81
|
87
|
self.del_superior(sup, nature)
|
82
|
|
- return super(EmType, self).delete()
|
|
88
|
+ if super(EmType, self).delete():
|
|
89
|
+ return self.check()
|
|
90
|
+ else:
|
|
91
|
+ return False
|
83
|
92
|
|
84
|
93
|
## Get the list of non empty associated fieldgroups
|
85
|
94
|
# @return A list of EmFieldGroup instance
|