Use integer as default value for id when compare to 0

In Python3, it is no more allowed to compare None with integer.

issue6231
review27941002
This commit is contained in:
Cédric Krier committed 2017-02-01 10:29:54 +01:00
1 parent 8339247071
commit 37cd24210a
1 file changed
+1 -1
+1 -1
View File
@@ -123,7 +123,7 @@ def instanciate_values(Target, value):
if isinstance(data, Target):
return data
elif isinstance(data, dict):
if data.get('id') >= 0:
if data.get('id', -1) >= 0:
values = {}
values.update(data)
values.update(kwargs)