diff --git a/octopoes/octopoes/connector/octopoes.py b/octopoes/octopoes/connector/octopoes.py index 227ac5343c3..f94f1606c5d 100644 --- a/octopoes/octopoes/connector/octopoes.py +++ b/octopoes/octopoes/connector/octopoes.py @@ -27,7 +27,7 @@ from octopoes.models.transaction import TransactionRecord from octopoes.models.tree import ReferenceTree from octopoes.models.types import OOIType -from octopoes.types import DECLARATION_CREATED, OBSERVATION_CREATED, ORIGIN_DELETED +from octopoes.types import DECLARATION_CREATED, OBJECT_DELETED, OBSERVATION_CREATED, ORIGIN_DELETED class OctopoesAPIConnector: @@ -227,7 +227,7 @@ def delete(self, reference: Reference, valid_time: datetime) -> None: params = {"reference": str(reference), "valid_time": str(valid_time)} self.session.delete(f"/{self.client}/", params=params) - self.logger.info("Deleted object", reference=reference, valid_time=valid_time) + self.logger.info("Deleted object", reference=reference, valid_time=valid_time, event_code=OBJECT_DELETED) def delete_many(self, references: list[Reference], valid_time: datetime) -> None: params = {"valid_time": str(valid_time)} diff --git a/octopoes/octopoes/types.py b/octopoes/octopoes/types.py index 7b4f88a649d..ff88a48d4e4 100644 --- a/octopoes/octopoes/types.py +++ b/octopoes/octopoes/types.py @@ -3,3 +3,4 @@ DECLARATION_CREATED = 100201 AFFIRMATION_CREATED = 100301 ORIGIN_DELETED = 100403 +OBJECT_DELETED = 100503