From b7b8ab99bf59de4b2db509e64b23073f8b890d02 Mon Sep 17 00:00:00 2001 From: Alexander Berger Date: Fri, 27 Sep 2024 11:41:39 -0400 Subject: [PATCH] Fixing authneticated search call --- src/geneweaver/api/controller/genesets.py | 2 +- src/geneweaver/api/controller/search.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geneweaver/api/controller/genesets.py b/src/geneweaver/api/controller/genesets.py index 8b742d8..33d36fe 100644 --- a/src/geneweaver/api/controller/genesets.py +++ b/src/geneweaver/api/controller/genesets.py @@ -159,7 +159,7 @@ def search( return SearchResponse( db_search.genesets( cursor, - is_readable_by=0 if user is None else user.user_id, + is_readable_by=0 if user is None else user.id, **geneset_search.model_dump(exclude_none=True), ) ) diff --git a/src/geneweaver/api/controller/search.py b/src/geneweaver/api/controller/search.py index e97ffce..aaf22d6 100644 --- a/src/geneweaver/api/controller/search.py +++ b/src/geneweaver/api/controller/search.py @@ -48,7 +48,7 @@ def search( genesets = db_search.genesets( cursor, search_text=search_text, - is_readable_by=0 if user is None else user.user_id, + is_readable_by=0 if user is None else user.id, limit=limit, offset=offset, )