From dd541417cfd3b5280281bd934cebe094864b1602 Mon Sep 17 00:00:00 2001 From: "Jamie (Bear) Murphy" <1613241+ITJamie@users.noreply.github.com> Date: Mon, 31 Jul 2023 12:47:33 +0100 Subject: [PATCH] Update client.py --- src/onepasswordconnectsdk/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/onepasswordconnectsdk/client.py b/src/onepasswordconnectsdk/client.py index 81fb5cd..694da33 100644 --- a/src/onepasswordconnectsdk/client.py +++ b/src/onepasswordconnectsdk/client.py @@ -189,7 +189,7 @@ def get_items(self, vault_id: str, filter_query=None): Args: vault_id (str): The id of the vault in which to get the items from - filter_query (str): A optional query statement, eg `title eq foo.bar` + filter_query (str): A optional query statement. `title eq foo.bar` Raises: FailedToRetrieveItemException: Thrown when a HTTP error is returned @@ -198,10 +198,10 @@ def get_items(self, vault_id: str, filter_query=None): Returns: List[SummaryItem]: A list of summarized items """ - if filter_query: - url = f"/v1/vaults/{vault_id}/items?filter={filter_query}" - else: + if filter_query is None: url = f"/v1/vaults/{vault_id}/items" + else: + url = f"/v1/vaults/{vault_id}/items?filter={filter_query}" response = self.build_request("GET", url) try: