Skip to content

Commit

Permalink
Update scheduled Action (#256)
Browse files Browse the repository at this point in the history
when `min/max capacity`  is set to `0`  fix
  • Loading branch information
samyuktha-edara authored Dec 5, 2023
1 parent 22878b8 commit 3a339a3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def define_scalable_target_action(model) -> dict:
"Schedule": model.Schedule,
}
target_action: dict = {}
if model.ScalableTargetAction.MinCapacity:
if model.ScalableTargetAction.MinCapacity is not None:
target_action["MinCapacity"] = int(model.ScalableTargetAction.MinCapacity)
if model.ScalableTargetAction.MaxCapacity:
if model.ScalableTargetAction.MaxCapacity is not None:
target_action["MaxCapacity"] = int(model.ScalableTargetAction.MaxCapacity)
if model.EndTime and isinstance(model.EndTime, str):
try:
Expand Down

0 comments on commit 3a339a3

Please sign in to comment.