Skip to content

Commit 91393a9

Browse files
committed
just compare the id, if it exists
1 parent 097a557 commit 91393a9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frost_sta_client/model/entity.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ def __eq__(self, other):
109109
return False
110110
if id(self) == id(other):
111111
return True
112-
if self.id != other.id:
113-
return False
112+
if self.id and other.id:
113+
if self.id != other.id:
114+
return False
114115
return True
115116

116117
def __ne__(self, other):

0 commit comments

Comments
 (0)