Skip to content

Commit 9825b46

Browse files
committed
safer way to remove the field from the response
1 parent 8d4c710 commit 9825b46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

localstack-core/localstack/services/kms/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def replicate_key(
525525
# CurrentKeyMaterialId is not returned in the ReplicaKeyMetadata. May be due to not being evaluated until
526526
# the key has been successfully replicated as it does not show up in DescribeKey immediately either.
527527
replica_key_metadata_response = copy.deepcopy(replica_key.metadata)
528-
del replica_key_metadata_response["CurrentKeyMaterialId"]
528+
replica_key_metadata_response.pop("CurrentKeyMaterialId", None)
529529

530530
return ReplicateKeyResponse(ReplicaKeyMetadata=replica_key_metadata_response)
531531

0 commit comments

Comments
 (0)