File tree 1 file changed +2
-2
lines changed
aws_lambda_powertools/utilities/data_classes 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ def group_configuration(self) -> GroupOverrideDetails:
474
474
@property
475
475
def user_attributes (self ) -> Dict [str , str ]:
476
476
"""One or more name-value pairs representing user attributes."""
477
- return self ["request" ][ "userAttributes" ]
477
+ return self ["request" ]. get ( "userAttributes" ) or {}
478
478
479
479
@property
480
480
def client_metadata (self ) -> Optional [Dict [str , str ]]:
@@ -1062,7 +1062,7 @@ def code(self) -> str:
1062
1062
@property
1063
1063
def user_attributes (self ) -> Dict [str , str ]:
1064
1064
"""One or more name-value pairs representing user attributes. The attribute names are the keys."""
1065
- return self ["request" ][ "userAttributes" ]
1065
+ return self ["request" ]. get ( "userAttributes" ) or {}
1066
1066
1067
1067
@property
1068
1068
def client_metadata (self ) -> Dict [str , str ]:
You can’t perform that action at this time.
0 commit comments