diff --git a/src/azul/plugins/repository/tdr_anvil/__init__.py b/src/azul/plugins/repository/tdr_anvil/__init__.py index e5564fcce..ae69b5463 100644 --- a/src/azul/plugins/repository/tdr_anvil/__init__.py +++ b/src/azul/plugins/repository/tdr_anvil/__init__.py @@ -17,6 +17,7 @@ import uuid import attrs +from docutils.nodes import description from more_itertools import ( one, ) @@ -457,8 +458,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,