Skip to content

Commit

Permalink
Merge pull request #28 from soloam/fix_budget_limits
Browse files Browse the repository at this point in the history
fix: empty budget limits
  • Loading branch information
soloam authored May 21, 2024
2 parents f2da26a + 1bf6dc0 commit 8cd6436
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ async def budgets(self, ids=None, currency=None) -> FireflyiiiObjectBaseList:
budget_limits = await self._request_api(
"GET", f"/budgets/{budget_id}/limits", params
)
if not "data" in budget_limits or len(budget_limits["data"]) < 1:
budget_limits = None
if not budget_limits or not "data" in budget_limits or len(budget_limits["data"]) < 1:
budget_limits = {}
else:
budget_limit = budget_limits["data"][0]

Expand Down

0 comments on commit 8cd6436

Please sign in to comment.