Browse Source

lerelation: empty return value from datasource would be [] not None

ArnAud 9 years ago
parent
commit
ab59896f8f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      leapi/lerelation.py

+ 1
- 1
leapi/lerelation.py View File

@@ -233,7 +233,7 @@ class _LeRel2Type(_LeRelation):
233 233
             limit = 1,
234 234
             instanciate = False
235 235
         )
236
-        return 1 if ret is None else ret[0]['rank']
236
+        return 1 if not ret else ret[0]['rank']
237 237
 
238 238
     ## @brief Implements insert for rel2type
239 239
     # @todo checks when autodetecing the rel2type class

Loading…
Cancel
Save