Skip to content

Commit

Permalink
fix: graceful domain_set as str
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Aug 9, 2023
1 parent 8ac2db4 commit a570a2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pythonseer/censure.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def get_given(
domain_csv = self._requestor.home_domain
if not domain_csv:
raise Exception("Must provide a domain or login to GET /censures_given/ endpoint")
# Handle sending the domain name as str gracefully
elif type(domain_set) is str:
domain_csv = domain_set
else:
domain_csv = ','.join(domain_set)
endpoint = f"/censures_given/{domain_csv}{format.get_query('?')}"
Expand Down
3 changes: 3 additions & 0 deletions pythonseer/endorsement.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def get_given(
domain_csv = self._requestor.home_domain
if not domain_csv:
raise Exception("Must provide a domain or login to GET /approvals/ endpoint")
# Handle sending the domain name as str gracefully
elif type(domain_set) is str:
domain_csv = domain_set
else:
domain_csv = ','.join(domain_set)
endpoint = f"/approvals/{domain_csv}{format.get_query('?')}"
Expand Down

0 comments on commit a570a2c

Please sign in to comment.