forked from platypush/platypush
Be a bit more resilient if an upstream integration sent some empty entities
This commit is contained in:
parent
6711b26137
commit
9c03b028d7
1 changed files with 3 additions and 0 deletions
|
@ -68,6 +68,9 @@ class EntityManager(ABC):
|
||||||
|
|
||||||
def _normalize_entities(self, entities: Collection[Entity]) -> Collection[Entity]:
|
def _normalize_entities(self, entities: Collection[Entity]) -> Collection[Entity]:
|
||||||
for entity in entities:
|
for entity in entities:
|
||||||
|
if not entity:
|
||||||
|
continue
|
||||||
|
|
||||||
if entity.id and not entity.external_id:
|
if entity.id and not entity.external_id:
|
||||||
# Entity IDs can only refer to the internal primary key
|
# Entity IDs can only refer to the internal primary key
|
||||||
entity.external_id = entity.id
|
entity.external_id = entity.id
|
||||||
|
|
Loading…
Reference in a new issue