Browse Source

Casts the rank value from the resultset in LeRelation.get_max_rank() to an int

Roland Haroutiounian 9 years ago
parent
commit
f3108d95d8
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      leapi/lerelation.py

+ 1
- 1
leapi/lerelation.py View File

@@ -134,7 +134,7 @@ class _LeRelation(lecrud._LeCrud):
134 134
     # @todo implementation
135 135
     def get_max_rank(self):
136 136
         max_rank_result = self.__class__.get(field_list=['rank'], order=[('rank', 'DESC')], limit=1)
137
-        max_rank = max_rank_result[0].rank
137
+        max_rank = int(max_rank_result[0].rank)
138 138
         return max_rank+1
139 139
 
140 140
 ## @brief Abstract class to handle hierarchy relations

Loading…
Cancel
Save