From 91393a99ee7bbc34622a88391b799ea1ac4c236d Mon Sep 17 00:00:00 2001 From: Marc Adolf Date: Mon, 21 Aug 2023 17:17:39 +0200 Subject: [PATCH 1/2] just compare the id, if it exists --- frost_sta_client/model/entity.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frost_sta_client/model/entity.py b/frost_sta_client/model/entity.py index ff09ad8..21b449c 100644 --- a/frost_sta_client/model/entity.py +++ b/frost_sta_client/model/entity.py @@ -109,8 +109,9 @@ def __eq__(self, other): return False if id(self) == id(other): return True - if self.id != other.id: - return False + if self.id and other.id: + if self.id != other.id: + return False return True def __ne__(self, other): From 459581fe392da214fe446e0095bb53a191f8b48f Mon Sep 17 00:00:00 2001 From: Jonathan Vogl Date: Tue, 22 Aug 2023 09:41:33 +0200 Subject: [PATCH 2/2] check if ids exist with none --- frost_sta_client/__version__.py | 2 +- frost_sta_client/model/entity.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frost_sta_client/__version__.py b/frost_sta_client/__version__.py index 5700bfe..2e4897b 100644 --- a/frost_sta_client/__version__.py +++ b/frost_sta_client/__version__.py @@ -1,5 +1,5 @@ __title__ = 'frost_sta_client' -__version__ = '1.1.43' +__version__ = '1.1.44' __license__ = 'LGPL3' __author__ = 'Jonathan Vogl' __copyright__ = 'Fraunhofer IOSB' diff --git a/frost_sta_client/model/entity.py b/frost_sta_client/model/entity.py index 21b449c..7a765ad 100644 --- a/frost_sta_client/model/entity.py +++ b/frost_sta_client/model/entity.py @@ -109,7 +109,7 @@ def __eq__(self, other): return False if id(self) == id(other): return True - if self.id and other.id: + if self.id is not None and other.id is not None: if self.id != other.id: return False return True