Skip to content

Commit

Permalink
bug squashed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongsun96 authored and Weves committed Aug 31, 2023
1 parent 5dc855c commit c1727e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/danswer/background/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def create_indexing_jobs(db_session: Session, existing_jobs: dict[int, Future])
db_session,
failure_reason="Stopped mid run, likely due to the background process being killed",
)
if attempt.connector_id and attempt.credential_id:
if attempt.connector_id is not None and attempt.credential_id is not None:
update_connector_credential_pair(
db_session=db_session,
connector_id=attempt.connector_id,
Expand Down Expand Up @@ -137,7 +137,10 @@ def cleanup_indexing_jobs(
db_session=db_session,
failure_reason="Stopped mid run, likely due to the background process being killed",
)
if index_attempt.connector_id and index_attempt.credential_id:
if (
index_attempt.connector_id is not None
and index_attempt.credential_id is not None
):
update_connector_credential_pair(
db_session=db_session,
connector_id=index_attempt.connector_id,
Expand Down

1 comment on commit c1727e6

@vercel
Copy link

@vercel vercel bot commented on c1727e6 Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.