forked from platypush/platypush
entity_key should coalesce (entity.external_id or entity.id)
This commit is contained in:
parent
72c55c03f2
commit
b9efa9fa30
1 changed files with 2 additions and 0 deletions
|
@ -105,7 +105,9 @@ if 'entity' not in Base.metadata:
|
||||||
"""
|
"""
|
||||||
This method returns the "external" key of an entity.
|
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), str(self.plugin))
|
||||||
|
return (str(self.external_id or self.id), str(self.plugin))
|
||||||
|
|
||||||
def _serialize_value(self, col: ColumnProperty) -> Any:
|
def _serialize_value(self, col: ColumnProperty) -> Any:
|
||||||
val = getattr(self, col.key)
|
val = getattr(self, col.key)
|
||||||
|
|
Loading…
Reference in a new issue