Skip to content

Commit 4ec3c7e

Browse files
committed
chore: fix missing sentinel getattr
1 parent 8e115bb commit 4ec3c7e

File tree

1 file changed

+2
-2
lines changed
  • aws_lambda_powertools/utilities/feature_flags

1 file changed

+2
-2
lines changed

aws_lambda_powertools/utilities/feature_flags/schema.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def validate_condition_key(condition: Dict[str, Any], rule_name: str):
355355
#
356356
# maintenance: we should split to separate file/classes for better organization, e.g., visitor pattern.
357357

358-
custom_validator = getattr(ConditionsValidator, f"_validate_{action.lower()}_key")
358+
custom_validator = getattr(ConditionsValidator, f"_validate_{action.lower()}_key", None)
359359

360360
# ~90% of actions available don't require a custom validator
361361
# logging a debug statement for no-match will increase CPU cycles for most customers
@@ -381,7 +381,7 @@ def validate_condition_value(condition: Dict[str, Any], rule_name: str):
381381
#
382382
# maintenance: we should split to separate file/classes for better organization, e.g., visitor pattern.
383383

384-
custom_validator = getattr(ConditionsValidator, f"_validate_{action.lower()}_value")
384+
custom_validator = getattr(ConditionsValidator, f"_validate_{action.lower()}_value", None)
385385

386386
# ~90% of actions available don't require a custom validator
387387
# logging a debug statement for no-match will increase CPU cycles for most customers

0 commit comments

Comments
 (0)