bug squashed

This commit is contained in:
Yuhong Sun 2023-08-31 13:39:51 -07:00 committed by Chris Weaver
parent 5dc855c4fc
commit c1727e63ad

View File

@ -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,
@ -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,