Skip to content

Commit f935e69

Browse files
author
Michael Brewer
committed
refactor: Even simplier
1 parent 0be68bd commit f935e69

File tree

1 file changed

+1
-3
lines changed
  • aws_lambda_powertools/utilities/idempotency/persistence

1 file changed

+1
-3
lines changed

aws_lambda_powertools/utilities/idempotency/persistence/base.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,9 @@ def _get_hashed_idempotency_key(self, lambda_event: Dict[str, Any]) -> str:
183183

184184
@staticmethod
185185
def is_missing_idempotency_key(data) -> bool:
186-
if not data:
187-
return True
188186
if type(data).__name__ in ("tuple", "list", "dict"):
189187
return all(x is None for x in data)
190-
return False
188+
return not data
191189

192190
def _get_hashed_payload(self, lambda_event: Dict[str, Any]) -> str:
193191
"""

0 commit comments

Comments
 (0)