From 9f236d1257cf64c630d2fe0c59d580e32568fc2f Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 21 Mar 2024 10:23:24 +0300 Subject: Return empty tuples when metadata is queried for data. * gn_auth/auth/authorisation/resources/models.py (resource_data): A metadata resource is not linked to any data so we return an empty tuple. Signed-off-by: Munyoki Kilyungi --- gn_auth/auth/authorisation/resources/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gn_auth/auth/authorisation/resources/models.py b/gn_auth/auth/authorisation/resources/models.py index 60d24ff..9e06aa8 100644 --- a/gn_auth/auth/authorisation/resources/models.py +++ b/gn_auth/auth/authorisation/resources/models.py @@ -185,6 +185,9 @@ def resource_data(conn, resource, offset: int = 0, limit: Optional[int] = None) "mrna": mrna_resource_data, "genotype": genotype_resource_data, "phenotype": phenotype_resource_data, + "phenotype-metadata": lambda *args: tuple(), + "genotype-metadata": lambda *args: tuple(), + "mrna-metadata": lambda *args: tuple(), "system": lambda *args: tuple(), "group": lambda *args: tuple() } -- cgit v1.2.3