Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ITJamie authored Jul 31, 2023
1 parent 07de759 commit dd54141
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/onepasswordconnectsdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit dd54141

Please sign in to comment.