diff options
author | Frederick Muriuki Muriithi | 2021-09-22 07:06:14 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-09-22 07:06:14 +0300 |
commit | 5892ffc7488b0c9cbb4ea08fd5c5f8648e0baea8 (patch) | |
tree | 708e51345344d18f4766b3b1ae0ba73aad481177 | |
parent | 920be820e9cefe1dcde86d9a252f098c67a2bb8b (diff) | |
download | genenetwork3-5892ffc7488b0c9cbb4ea08fd5c5f8648e0baea8.tar.gz |
Update check: Heatmaps need at least 2 items
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Update the check to look for at least 2 traits before trying to generate the
heatmap.
-rw-r--r-- | gn3/api/heatmaps.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py index 0493f8a..1022a35 100644 --- a/gn3/api/heatmaps.py +++ b/gn3/api/heatmaps.py @@ -11,9 +11,9 @@ heatmaps = Blueprint("heatmaps", __name__) def clustered_heatmaps(): heatmap_request = request.get_json() traits_names = heatmap_request.get("traits_names", tuple()) - if len(traits_names) < 1: + if len(traits_names) < 2: return jsonify({ - "message": "You need to provide at least one trait name." + "message": "You need to provide at least two trait names." }), 400 conn, _cursor = database_connector() def parse_trait_fullname(trait): |