typing fix (#4342)

* typing fix

* changed type hint to help future coders
This commit is contained in:
evan-danswer 2025-03-24 18:01:13 -07:00 committed by GitHub
parent 55fb5c3ca5
commit 17925b49e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -175,9 +175,12 @@ def _get_tickets_page(
)
def _fetch_author(client: ZendeskClient, author_id: str) -> BasicExpertInfo | None:
def _fetch_author(
client: ZendeskClient, author_id: str | int
) -> BasicExpertInfo | None:
# Skip fetching if author_id is invalid
if not author_id or author_id == "-1":
# cast to str to avoid issues with zendesk changing their types
if not author_id or str(author_id) == "-1":
return None
try: