Skip to content

Commit

Permalink
Fix: number maybe empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola committed Nov 15, 2024
1 parent db1d2aa commit 5805b59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/core/app/apps/base_app_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def _validate_inputs(
)

if variable_entity.type == VariableEntityType.NUMBER and isinstance(value, str):
# handle empty string case
if not value.strip():
return None
# may raise ValueError if user_input_value is not a valid number
try:
if "." in value:
Expand Down

0 comments on commit 5805b59

Please sign in to comment.