Skip to content

Commit

Permalink
fix: indentation fix in client
Browse files Browse the repository at this point in the history
  • Loading branch information
geertmeersman authored Jan 9, 2025
1 parent a44805f commit 3e5ea27
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions custom_components/mobile_vikings/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,22 @@ async def get_subscriptions(self):
f"/subscriptions/{subscription_id}/modem/settings"
)
else:
# Check if the 'sim' field exists and 'msisdn' is not empty
sim_info = subscription.get("sim", {})
if sim_info.get("msisdn"):
try:
balance = await self.handle_request(
f"/subscriptions/{subscription_id}/balance"
)
subscription["balance"] = balance
subscription["balance_aggregated"] = self.aggregate_bundles_by_type(
balance
)
except Exception as e:
_LOGGER.debug(
f"Failed to retrieve balance for subscription {subscription_id}: {e}"
)
# Continue without setting the balance if there's an error
# Check if the 'sim' field exists and 'msisdn' is not empty
sim_info = subscription.get("sim", {})
if sim_info.get("msisdn"):
try:
balance = await self.handle_request(
f"/subscriptions/{subscription_id}/balance"
)
subscription["balance"] = balance
subscription["balance_aggregated"] = self.aggregate_bundles_by_type(
balance
)
except Exception as e:
_LOGGER.debug(
f"Failed to retrieve balance for subscription {subscription_id}: {e}"
)
# Continue without setting the balance if there's an error
subscription["product"] = await self.get_product_details(
subscription.get("product_id")
)
Expand Down

0 comments on commit 3e5ea27

Please sign in to comment.