Skip to content

Commit

Permalink
fix: handle case where no configurator spawned
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed May 23, 2020
1 parent db8c055 commit 7b2d666
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/alexa_media/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ async def configuration_callback(callback_data):
submit_caption="Confirm",
fields=[],
)
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["configurator"].append(config_id)
if config_id:
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["configurator"].append(
config_id
)
if "error_message" in status and status["error_message"]:
configurator.async_notify_errors(config_id, status["error_message"])
if len(hass.data[DATA_ALEXAMEDIA]["accounts"][email]["configurator"]) > 1:
Expand Down

0 comments on commit 7b2d666

Please sign in to comment.