Don't delete external_id and data attributes unless they are set

This commit is contained in:
Fabio Manganiello 2023-01-02 21:01:46 +01:00
parent b0671354ea
commit 0f60bc2131
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1177,7 +1177,9 @@ class LightHuePlugin(RunnablePlugin, LightPlugin):
for attr, value in (light.data or {}).items():
setattr(light, attr, value)
if light.external_id is not None:
del light.external_id
if light.data is not None:
del light.data
return lights