From 6f6ea98691728cf9d03148f6bc8fa6de1558a915 Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Tue, 25 Apr 2023 14:26:41 -0500 Subject: [PATCH] fix bug when accessing link in client.py instance --- pyteamsnap/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyteamsnap/client.py b/pyteamsnap/client.py index a1f2bb8..17ee3a9 100644 --- a/pyteamsnap/client.py +++ b/pyteamsnap/client.py @@ -36,8 +36,7 @@ class TeamSnap(APIClient): pass def link(self, link_name): - d = {link["rel"]: link["href"] for link in self._root_collection["links"]} - return d.get(link_name) + return self._root_collection.links.get(rel=link_name).href def bulk_load( self, team_id, types: T.List[T.Any], **kwargs # TODO fix typing