Skip to content

Commit 3388407

Browse files
committed
fix remove state table record function
1 parent f7ea39d commit 3388407

File tree

1 file changed

+3
-2
lines changed
  • aws_sra_examples/solutions/genai/bedrock_org/lambda/src

1 file changed

+3
-2
lines changed

aws_sra_examples/solutions/genai/bedrock_org/lambda/src/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,11 +569,12 @@ def remove_state_table_record(resource_arn):
569569
)
570570
if item_found is False:
571571
LOGGER.info(f"Record not found in {STATE_TABLE} dynamodb table")
572+
response = {}
572573
else:
573574
sra_resource_record_id = find_result["record_id"]
574575
LOGGER.info(f"Found record id {sra_resource_record_id}")
575-
LOGGER.info(f"Removing {sra_resource_record_id} from {STATE_TABLE} dynamodb table...")
576-
response = dynamodb.delete_item(STATE_TABLE, dynamodb_resource, SOLUTION_NAME, sra_resource_record_id)
576+
LOGGER.info(f"Removing {sra_resource_record_id} from {STATE_TABLE} dynamodb table...")
577+
response = dynamodb.delete_item(STATE_TABLE, dynamodb_resource, SOLUTION_NAME, sra_resource_record_id)
577578
return response
578579

579580

0 commit comments

Comments
 (0)