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:
1 parent
8339247071
commit
37cd24210a
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user