EOX GitLab Instance

Skip to content
Snippets Groups Projects

Registration routes

Merged Fabian Schindler-Strauss requested to merge routes into main
2 unresolved threads
Files
7
@@ -60,7 +60,7 @@ class ItemToProductTypeMapping(TypedDict):
collections: List[str]
class EOxServerBackend(Backend["Item"]):
class ItemBackend(Backend["Item"]):
"""
EOxServer backend allows registration to be performed on a running
EOxServer instance
@@ -337,7 +337,7 @@ class EOxServerBackend(Backend["Item"]):
return product
@transaction.atomic
def register_item(self, source: Optional[Source], item: "Item", replace: bool):
def register(self, source: Optional[Source], item: "Item", replace: bool):
"""Registers the item to the endpoint
Args:
@@ -396,8 +396,13 @@ class EOxServerBackend(Backend["Item"]):
else:
raise RegistrationError(f"{item} not matched to any product_type")
def deregister(self, source: Optional[Source], item: "Item"):
""" Defers to ``deregister_identifier`` with the items identifier
"""
return self.deregister_identifier(item.id)
@transaction.atomic
def deregister_identifier(self, identifier: str) -> Optional[str]:
def deregister_identifier(self, identifier: str):
"""Attempts to deregister item
Args:
Loading