Skip to content

Commit cbee95c

Browse files
committed
WIP
1 parent e5f9669 commit cbee95c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

delta_backend/src/delta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ def handler(event, context):
7575
logger.info(f"Record from DPS skipped for {imms_id}")
7676
return {"statusCode": 200, "body": f"Record from DPS skipped for {imms_id}"}
7777
else:
78-
operation = OperationName.DELETE
78+
operation = OperationName.DELETE_PHYSICAL
7979
new_image = record["dynamodb"]["Keys"]
8080
logger.info(f"Record to delta:{new_image}")
8181
imms_id = new_image["PK"]["S"].split("#")[1]
8282
response = delta_table.put_item(
8383
Item={
8484
"PK": str(uuid.uuid4()),
8585
"ImmsID": imms_id,
86-
"Operation": OperationName.DELETE,
86+
"Operation": OperationName.DELETE_PHYSICAL,
8787
"VaccineType": "default",
8888
"SupplierSystem": "default",
8989
"DateTimeStamp": approximate_creation_time.isoformat(),

delta_backend/tests/test_convert_to_flat_json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ def test_handler_imms_convert_to_flat_json(self):
183183
"""Test that the Imms field contains the correct flat JSON data for CREATE, UPDATE, and DELETE operations."""
184184
expected_action_flags = [
185185
{"Operation": OperationName.CREATE, "EXPECTED_ACTION_FLAG": ActionFlag.CREATE},
186-
# {"Operation": OperationName.UPDATE, "EXPECTED_ACTION_FLAG": ActionFlag.UPDATE},
187-
# {"Operation": OperationName.DELETE, "EXPECTED_ACTION_FLAG": ActionFlag..DELETE},
186+
{"Operation": OperationName.UPDATE, "EXPECTED_ACTION_FLAG": ActionFlag.UPDATE},
187+
{"Operation": OperationName.DELETE_PHYSICAL, "EXPECTED_ACTION_FLAG": ActionFlag.DELETE_PHYSICAL},
188188
]
189189

190190
for test_case in expected_action_flags:

0 commit comments

Comments
 (0)