diff options
author | zsloan | 2025-06-09 20:15:45 +0000 |
---|---|---|
committer | zsloan | 2025-06-09 20:15:45 +0000 |
commit | b78daa6ce260c87f6df9088a0e6303030c0e4ac1 (patch) | |
tree | f8beec69ecd120d9d1c5da16e0307403750088a2 | |
parent | d2492d4da6707be0764b6faf80c55a7e06449e13 (diff) | |
download | gn-auth-b78daa6ce260c87f6df9088a0e6303030c0e4ac1.tar.gz |
Add inbredset-group resource type in unlinked_data function
This still needs to be implemented, but this commit prevents the key error
-rw-r--r-- | gn_auth/auth/authorisation/resources/groups/views.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/resources/groups/views.py b/gn_auth/auth/authorisation/resources/groups/views.py index 368284f..746e23c 100644 --- a/gn_auth/auth/authorisation/resources/groups/views.py +++ b/gn_auth/auth/authorisation/resources/groups/views.py @@ -235,7 +235,7 @@ def unlinked_data(resource_type: str) -> Response: if resource_type in ("system", "group"): return jsonify(tuple()) - if resource_type not in ("all", "mrna", "genotype", "phenotype"): + if resource_type not in ("all", "mrna", "genotype", "phenotype", "inbredset-group"): raise AuthorisationError(f"Invalid resource type {resource_type}") with require_oauth.acquire("profile group resource") as the_token: @@ -253,7 +253,8 @@ def unlinked_data(resource_type: str) -> Response: "genotype": unlinked_genotype_data, "phenotype": lambda conn, grp: partial( unlinked_phenotype_data, gn3conn=gn3conn)( - authconn=conn, group=grp) + authconn=conn, group=grp), + "inbredset-group": lambda authconn, ugroup: [] # Still need to implement this } return jsonify(tuple( dict(row) for row in unlinked_fns[resource_type]( |