diff options
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/auth/authorisation/data/phenotypes.py | 2 | ||||
-rw-r--r-- | gn3/auth/authorisation/data/views.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gn3/auth/authorisation/data/phenotypes.py b/gn3/auth/authorisation/data/phenotypes.py index 3ba478a..db16699 100644 --- a/gn3/auth/authorisation/data/phenotypes.py +++ b/gn3/auth/authorisation/data/phenotypes.py @@ -17,6 +17,8 @@ def linked_phenotype_data( authcursor.execute("SELECT * FROM linked_phenotype_data") linked = tuple(tuple(row[key] for key in authkeys) for row in authcursor.fetchall()) + if len(linked) <= 0: + return (item for item in tuple()) paramstr = "".join(["(%s, %s, %s, %s)"] * len(linked)) query = ( "SELECT spc.SpeciesId, spc.SpeciesName, iset.InbredSetId, " diff --git a/gn3/auth/authorisation/data/views.py b/gn3/auth/authorisation/data/views.py index a14e78b..a9861d2 100644 --- a/gn3/auth/authorisation/data/views.py +++ b/gn3/auth/authorisation/data/views.py @@ -163,7 +163,7 @@ def __search_phenotypes__(): f"--gn3-db-uri={app.config['SQL_URI']}", f"--redis-uri={redisuri}", f"--per-page={__request_key__('per_page')}"] +( - [f"--selected='{json.dumps(selected)}"] + [f"--selected={json.dumps(selected)}"] if len(selected) > 0 else []) jobs.create_job(redisconn, { "job_id": job_id, "command": command, "status": "queued", |