Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tenant context #2596

Merged
merged 23 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nit
  • Loading branch information
pablonyx committed Oct 10, 2024
commit 7cb58ee2062951865200d6bc5d6416d3dd68bdf9
6 changes: 4 additions & 2 deletions backend/danswer/server/documents/cc_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
update_connector_credential_pair_from_id,
)
from danswer.db.document import get_document_counts_for_cc_pairs
from danswer.db.engine import current_tenant_id
from danswer.db.engine import get_session
from danswer.db.enums import AccessType
from danswer.db.enums import ConnectorCredentialPairStatus
Expand All @@ -46,7 +47,6 @@
name_sync_external_doc_permissions_task,
)
from ee.danswer.db.user_group import validate_user_creation_permissions
from danswer.db.engine import current_tenant_id

logger = setup_logger()
router = APIRouter(prefix="/manage")
Expand Down Expand Up @@ -258,7 +258,9 @@ def prune_cc_pair(
f"credential_id={cc_pair.credential_id} "
f"{cc_pair.connector.name} connector."
)
tasks_created = try_creating_prune_generator_task(cc_pair, db_session, r, current_tenant_id.get())
tasks_created = try_creating_prune_generator_task(
cc_pair, db_session, r, current_tenant_id.get()
)
if not tasks_created:
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
Expand Down