When an account exist without a subscription "provider" will not exist (#83472)

This commit is contained in:
Joakim Sørensen
2022-12-07 16:48:34 +01:00
committed by GitHub
parent f6f89b6c5a
commit 8ed6fcd58e
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ def async_manage_legacy_subscription_issue(
If the provider is "legacy" create an issue, If the provider is "legacy" create an issue,
in all other cases remove the issue. in all other cases remove the issue.
""" """
if subscription_info["provider"] == "legacy": if subscription_info.get("provider") == "legacy":
ir.async_create_issue( ir.async_create_issue(
hass=hass, hass=hass,
domain=DOMAIN, domain=DOMAIN,

View File

@@ -70,7 +70,7 @@ async def test_legacy_subscription_delete_issue_if_no_longer_legacy(
domain="cloud", issue_id="legacy_subscription" domain="cloud", issue_id="legacy_subscription"
) )
cloud_repairs.async_manage_legacy_subscription_issue(hass, {"provider": None}) cloud_repairs.async_manage_legacy_subscription_issue(hass, {})
assert not issue_registry.async_get_issue( assert not issue_registry.async_get_issue(
domain="cloud", issue_id="legacy_subscription" domain="cloud", issue_id="legacy_subscription"
) )