diff options
author | Frederick Muriuki Muriithi | 2023-02-28 12:45:57 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-02-28 14:26:17 +0300 |
commit | e66e0d24f76458aade54056e18de7d4e0762d06c (patch) | |
tree | bbafabc572b3673d747df751ca4e5ec899f95b46 /gn3/auth/authorisation/resources | |
parent | bbd61fc91bd9bdbf41201dd8f609e02ef8339974 (diff) | |
download | genenetwork3-e66e0d24f76458aade54056e18de7d4e0762d06c.tar.gz |
auth: Unlink data from resourcesdata-access-levels-endpoint
Enable the data editor to unlink data from a particular resource.
Diffstat (limited to 'gn3/auth/authorisation/resources')
-rw-r--r-- | gn3/auth/authorisation/resources/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/auth/authorisation/resources/models.py b/gn3/auth/authorisation/resources/models.py index 13f234f..be1bc17 100644 --- a/gn3/auth/authorisation/resources/models.py +++ b/gn3/auth/authorisation/resources/models.py @@ -414,12 +414,12 @@ def __attach_data__( **acc, resource_id: acc.get(resource_id, tuple()) + (dict(row),) } - organised = reduce(__organise__, data_rows, {}) + organised: dict[UUID, tuple[dict, ...]] = reduce(__organise__, data_rows, {}) return tuple( Resource( resource.group, resource.resource_id, resource.resource_name, resource.resource_category, resource.public, - organised[resource.resource_id]) + organised.get(resource.resource_id, tuple())) for resource in resources) def attach_mrna_resources_data( |