diff --git a/docs/uri-scheme-browse-snapshot.rst b/docs/uri-scheme-browse-snapshot.rst --- a/docs/uri-scheme-browse-snapshot.rst +++ b/docs/uri-scheme-browse-snapshot.rst @@ -4,7 +4,7 @@ .. http:get:: /browse/snapshot/(snapshot_id)/ HTML view that displays the content of a snapshot from its identifier - (see :func:`swh.model.identifiers.snapshot_identifier` + (see :func:`swh.model.git_objects.snapshot_git_object` in our data model module for details about how they are computed). A snapshot is a set of named branches, which are pointers to objects at any diff --git a/swh/web/api/views/metadata.py b/swh/web/api/views/metadata.py --- a/swh/web/api/views/metadata.py +++ b/swh/web/api/views/metadata.py @@ -10,7 +10,7 @@ from django.http import HttpResponse -from swh.model import hashutil, identifiers +from swh.model import hashutil, swhids from swh.model.model import MetadataAuthority, MetadataAuthorityType from swh.web.api.apidoc import api_doc, format_docstring from swh.web.api.apiurls import api_route @@ -108,8 +108,8 @@ limit = min(limit, 10000) try: - target = identifiers.CoreSWHID.from_string(target).to_extended() - except identifiers.ValidationError as e: + target = swhids.CoreSWHID.from_string(target).to_extended() + except swhids.ValidationError as e: raise BadInputExc(f"Invalid target SWHID: {e.args[0]}") from None if page_token_str: @@ -230,8 +230,8 @@ target_str = target try: - target = identifiers.CoreSWHID.from_string(target_str).to_extended() - except identifiers.ValidationError as e: + target = swhids.CoreSWHID.from_string(target_str).to_extended() + except swhids.ValidationError as e: raise BadInputExc(f"Invalid target SWHID: {e.args[0]}") from None authorities = archive.storage.raw_extrinsic_metadata_get_authorities(target=target) diff --git a/swh/web/api/views/revision.py b/swh/web/api/views/revision.py --- a/swh/web/api/views/revision.py +++ b/swh/web/api/views/revision.py @@ -49,7 +49,7 @@ Get information about a revision in the archive. Revisions are identified by **sha1** checksums, compatible with Git commit identifiers. - See :func:`swh.model.identifiers.revision_identifier` in our data model + See :func:`swh.model.git_objects.revision_git_object` in our data model module for details about how they are computed. :param string sha1_git: hexadecimal representation of the revision