From 7b0b646e4af42fa1f2a98c0722f21e1d3a28abf3 Mon Sep 17 00:00:00 2001 From: Daniel Sotirhos Date: Fri, 22 Nov 2024 10:12:20 -0800 Subject: [PATCH] fixup! [r] Support for AnVIL duos_id (#6620) --- src/azul/plugins/repository/tdr_anvil/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/azul/plugins/repository/tdr_anvil/__init__.py b/src/azul/plugins/repository/tdr_anvil/__init__.py index e5564fcce..aa4113898 100644 --- a/src/azul/plugins/repository/tdr_anvil/__init__.py +++ b/src/azul/plugins/repository/tdr_anvil/__init__.py @@ -457,8 +457,12 @@ def _supplementary_bundle(self, bundle_fqid: TDRAnvilBundleFQID) -> TDRAnvilBund def _duos_bundle(self, bundle_fqid: TDRAnvilBundleFQID) -> TDRAnvilBundle: assert not bundle_fqid.is_batched, bundle_fqid duos_info = self.tdr.get_duos(bundle_fqid.source) - duos_id = None if duos_info is None else one(duos_info['consentGroups'])['datasetIdentifier'] - description = None if duos_info is None else duos_info.get('studyDescription') + if duos_info is None: + duos_id = None + description = None + else: + duos_id = one(duos_info['consentGroups'])['datasetIdentifier'] + description = duos_info.get('studyDescription') ref, row = self._get_dataset(bundle_fqid.source.spec) expected_entity_id = change_version(bundle_fqid.uuid, self.bundle_uuid_version,