mirror of
https://github.com/yweber/lodel2.git
synced 2026-07-01 05:10:49 +02:00
Bugfix on EmComponent.check()
This commit is contained in:
parent
9d77bb6a52
commit
0901c29a33
1 changed files with 2 additions and 2 deletions
|
|
@ -96,10 +96,10 @@ class EmComponent(object):
|
|||
# This function has to check that rank are correct and continuous other checks are made in childs classes
|
||||
# @warning Hardcoded minimum rank
|
||||
# @warning Rank modified by _fields['rank'].value
|
||||
# @return True
|
||||
# @throw EmComponentCheckError if fails
|
||||
def check(self):
|
||||
if self.get_max_rank() > len(self.same_rank_group()):
|
||||
self.model.sort_components(self.__class__)
|
||||
if self.get_max_rank() > len(self.same_rank_group()) or self.rank <= 0:
|
||||
#Non continuous ranks
|
||||
for i, component in enumerate(self.same_rank_group()):
|
||||
component.rank = i + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue