diff --git a/pillar/api/utils/__init__.py b/pillar/api/utils/__init__.py index 81411445..bb332b27 100644 --- a/pillar/api/utils/__init__.py +++ b/pillar/api/utils/__init__.py @@ -122,11 +122,9 @@ def project_get_node_type(project_document, node_type_node_name): if node_type['name'] == node_type_node_name), None) -def str2id(document_id): +def str2id(document_id: str) -> bson.ObjectId: """Returns the document ID as ObjectID, or raises a BadRequest exception. - :type document_id: str - :rtype: bson.ObjectId :raises: wz_exceptions.BadRequest """