mirror of
https://github.com/yweber/lodel2.git
synced 2026-06-13 22:20:47 +02:00
[#44] Ajout d'un début de méthode check et appel de celle-ci dans le delete
This commit is contained in:
parent
7f93063f05
commit
b668556c3f
2 changed files with 20 additions and 2 deletions
|
|
@ -24,8 +24,17 @@ class EmField(EmComponent):
|
|||
def __init__(self, datas, model):
|
||||
super(EmField, self).__init__(datas, model)
|
||||
|
||||
## Check if the EmField is valid
|
||||
# @return True if valid False if not
|
||||
def check(self):
|
||||
super(EmField, self).check()
|
||||
return True
|
||||
|
||||
## @brief Delete a field if it's not linked
|
||||
# @return bool : True if deleted False if deletion aborded
|
||||
# @todo Check if unconditionnal deletion is correct
|
||||
def delete(self):
|
||||
return self.model.delete_component(self.uid)
|
||||
if self.model.delete_component(self.uid):
|
||||
return self.check()
|
||||
else:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue