diff --git a/src/azul/plugins/repository/tdr_hca/__init__.py b/src/azul/plugins/repository/tdr_hca/__init__.py index 203f85040..2c0a6c2fe 100644 --- a/src/azul/plugins/repository/tdr_hca/__init__.py +++ b/src/azul/plugins/repository/tdr_hca/__init__.py @@ -245,11 +245,6 @@ def _add_manifest_entry(self, is_stitched: bool, checksums: Optional[Checksums] = None, drs_uri: Optional[str] = None) -> None: - # These requirements prevent mismatches in the DRS domain, and ensure - # that changes to the column syntax don't go undetected. - if drs_uri is not None: - parsed = RegularDRSURI.parse(drs_uri) - require(parsed.uri.netloc == config.tdr_service_url.netloc) self.manifest.append({ 'name': name, 'uuid': uuid, @@ -288,6 +283,10 @@ def _parse_drs_uri(self, external_drs_uri = None return external_drs_uri else: + # This requirement prevent mismatches in the DRS domain, and ensures + # that changes to the column syntax don't go undetected. + parsed = RegularDRSURI.parse(file_id) + require(parsed.uri.netloc == config.tdr_service_url.netloc) return file_id