浏览代码

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

ArnAud 9 年前
父节点
当前提交
ab59896f8f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      leapi/lerelation.py

+ 1
- 1
leapi/lerelation.py 查看文件

@@ -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

正在加载...
取消
保存