diff options
author | Frederick Muriuki Muriithi | 2023-03-20 12:12:36 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-03-20 12:12:36 +0300 |
commit | d48be5b240e9394955972a4e6aefe97d490b41fb (patch) | |
tree | e513076047e01298f8d00d854501efbea01a216b /wqflask | |
parent | d7157ce2178ed31addd92b69a160f4ea9b092a42 (diff) | |
download | genenetwork2-d48be5b240e9394955972a4e6aefe97d490b41fb.tar.gz |
oauth2: Pass the offset in the query
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/oauth2/data.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/wqflask/oauth2/data.py b/wqflask/wqflask/oauth2/data.py index cb9c1000..8005a2a0 100644 --- a/wqflask/wqflask/oauth2/data.py +++ b/wqflask/wqflask/oauth2/data.py @@ -34,7 +34,9 @@ def list_data(): return __render__(**{**groups, **roles}) dataset_type = request.form["dataset_type"] - offset = int(request.form.get("offset", 0)) + offset = int(request.form.get("offset", 0)) + ( + 0 if request.form.get("offset_submit") is None else( + 100 if request.form["offset_submit"] == "Next" else -100)) if dataset_type not in ("mrna", "genotype", "phenotype"): flash("InvalidDatasetType: An invalid dataset type was provided", "alert-danger") @@ -46,7 +48,7 @@ def list_data(): lambda data: {"data_items": data}) return __render__(**{ **groups, **roles, **data_items, "dataset_type": dataset_type, - "offset": (offset if offset >= 100 else 0) + "offset": offset }) @data.route("/link", methods=["POST"]) |