From b9efa9fa30db44a427baae1fe488b88de4939f82 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 6 Mar 2023 16:54:02 +0100 Subject: [PATCH] entity_key should coalesce (entity.external_id or entity.id) --- platypush/entities/_base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/entities/_base.py b/platypush/entities/_base.py index 7893342c1a..0839082444 100644 --- a/platypush/entities/_base.py +++ b/platypush/entities/_base.py @@ -105,7 +105,9 @@ if 'entity' not in Base.metadata: """ This method returns the "external" key of an entity. """ + return (str(self.external_id or self.id), str(self.plugin)) return (str(self.external_id), str(self.plugin)) + return (str(self.external_id or self.id), str(self.plugin)) def _serialize_value(self, col: ColumnProperty) -> Any: val = getattr(self, col.key)