diff options
author | Frederick Muriuki Muriithi | 2023-03-20 12:09:00 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-03-20 12:09:00 +0300 |
commit | 133021096a9d21151de16d364ed5864ac6a3aaa1 (patch) | |
tree | 9094f376c946fe133f167e5988ac4b06a27ebd23 /gn3/auth/authorisation/groups/views.py | |
parent | 40db1f395821785fe2c09d5cde56fb7241ee05c3 (diff) | |
download | genenetwork3-133021096a9d21151de16d364ed5864ac6a3aaa1.tar.gz |
auth: data: Enable offset in queries
Enable the 'OFFSET' clause in the queries to allow for progressive fetching of
data from the database using the 'Previous' and 'Next' buttons.
Diffstat (limited to 'gn3/auth/authorisation/groups/views.py')
-rw-r--r-- | gn3/auth/authorisation/groups/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/auth/authorisation/groups/views.py b/gn3/auth/authorisation/groups/views.py index 7b967d7..0b21800 100644 --- a/gn3/auth/authorisation/groups/views.py +++ b/gn3/auth/authorisation/groups/views.py @@ -177,7 +177,6 @@ def unlinked_data(resource_type: str) -> Response: f") {type_filter}") cursor.execute(ids_query) ids = cursor.fetchall() - print(f"THE IDS: {ids} ==> {type_filter}") if ids: clause = ", ".join(["(?, ?, ?)"] * len(ids)) @@ -204,7 +203,8 @@ def ungrouped_data(dataset_type: str) -> Response: with gn3dbutils.database_connection() as gn3conn: return jsonify(with_db_connection(partial( retrieve_ungrouped_data, gn3conn=gn3conn, - dataset_type=dataset_type))) + dataset_type=dataset_type, + offset = int(request.args.get("offset", 0))))) @groups.route("/data/link", methods=["POST"]) @require_oauth("profile group resource") |