|
@@ -113,7 +113,7 @@ class EmComponent(object):
|
113
|
113
|
# @throw EmComponentCheckError if fails
|
114
|
114
|
def check(self):
|
115
|
115
|
self.model.sort_components(self.__class__)
|
116
|
|
- if self.get_max_rank() > len(self.same_rank_group()) or self.rank <= 0:
|
|
116
|
+ if self.get_max_rank() != len(self.same_rank_group()) or self.rank <= 0:
|
117
|
117
|
#Non continuous ranks
|
118
|
118
|
for i, component in enumerate(self.same_rank_group()):
|
119
|
119
|
component.rank = i + 1
|
|
@@ -127,8 +127,7 @@ class EmComponent(object):
|
127
|
127
|
## @brief Get the maximum rank given an EmComponent child class and a ranked_in filter
|
128
|
128
|
# @return A positive integer or -1 if no components
|
129
|
129
|
def get_max_rank(self):
|
130
|
|
- components = self.same_rank_group()
|
131
|
|
- return len(components) + 1
|
|
130
|
+ return len(self.same_rank_group())
|
132
|
131
|
|
133
|
132
|
## Return an array of instances that are concerned by the same rank
|
134
|
133
|
# @return An array of instances that are concerned by the same rank
|