[FIX] core: int() deprecation warning

__int__ should always return an integer, not a bool and not a
completely unrelated type either.
This commit is contained in:
Xavier Morel
2020-02-04 12:42:35 +00:00
parent 7ad955d5b1
commit eae19fc2cd
+1 -1
View File
@@ -5625,7 +5625,7 @@ Record ids: %(records)s
return set(self._ids) >= set(other._ids)
def __int__(self):
return self.id
return self.id or 0
def __str__(self):
return "%s%s" % (self._name, getattr(self, '_ids', ""))