diff options
| author | Frederick Muriuki Muriithi | 2026-02-06 17:09:32 -0600 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-02-06 17:09:32 -0600 |
| commit | ca2fcbbad0714e6c67192b1bd0e2ab7375680c85 (patch) | |
| tree | d5f0597cfd53c4510ffc558ed3d061d4cc1b4b39 /gn_auth | |
| parent | 6f1907292cb2b54b8f18b139480b1837c6f355e0 (diff) | |
| download | gn-auth-main.tar.gz | |
Diffstat (limited to 'gn_auth')
| -rw-r--r-- | gn_auth/auth/authorisation/data/phenotypes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gn_auth/auth/authorisation/data/phenotypes.py b/gn_auth/auth/authorisation/data/phenotypes.py index 20f887c..1f79e0e 100644 --- a/gn_auth/auth/authorisation/data/phenotypes.py +++ b/gn_auth/auth/authorisation/data/phenotypes.py @@ -221,7 +221,8 @@ def fetch_resource_id(cursor: authdb.DbCursor, tuple(str(_id) for _id in data_link_ids)) _ids = tuple(uuid.UUID(row['resource_id']) for row in cursor.fetchall()) if len(_ids) != 1: - raise InvalidResourceError("...") + raise AuthorisationError( + f"Expected data from 1 resource, got {len(_ids)} resources.") return _ids[0] |
