mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 11:40:58 +00:00
Bump deps (#5385)
* bump deps * use isinstance where possible * and another bump ;-) * small fix for isinstance * fixed wrong comparison * fixed comparision * use exact comparision
This commit is contained in:
@ -17,13 +17,13 @@ class BaseEnum(enum.IntEnum):
|
||||
|
||||
def __eq__(self, obj):
|
||||
"""Override equality operator to allow comparison with int."""
|
||||
if type(self) == type(obj):
|
||||
if type(self) is type(obj):
|
||||
return super().__eq__(obj)
|
||||
return self.value == obj
|
||||
|
||||
def __ne__(self, obj):
|
||||
"""Override inequality operator to allow comparison with int."""
|
||||
if type(self) == type(obj):
|
||||
if type(self) is type(obj):
|
||||
return super().__ne__(obj)
|
||||
return self.value != obj
|
||||
|
||||
@ -70,7 +70,7 @@ class StatusCode(BaseEnum):
|
||||
return False
|
||||
if callable(value):
|
||||
return False
|
||||
if type(value.value) != int:
|
||||
if not isinstance(value.value, int):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
Reference in New Issue
Block a user