Skip to content

Commit

Permalink
refactor ResourcesT.cached_info()
Browse files Browse the repository at this point in the history
Signed-off-by: flashdagger <flashdagger@googlemail.com>
  • Loading branch information
flashdagger committed Oct 30, 2023
1 parent b316076 commit 774e164
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zammadoo/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ def url(self) -> str:

def cached_info(self, rid: int, refresh=True, expand=False) -> "JsonDict":
item = f"{self.url}/{rid}"
params = {"expand": True} if expand else None
cache = self.cache
callback: Callable[[], "JsonDict"] = partial(
self.client.get, self.endpoint, rid, params=params
self.client.get, self.endpoint, rid, params={"expand": expand or None}
)

if refresh:
Expand Down

0 comments on commit 774e164

Please sign in to comment.