Skip to content

Commit

Permalink
SKY-3781 Fix empty URL bug (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Oct 21, 2024
1 parent 62e5665 commit 9a9057c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions skyvern/forge/sdk/core/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

def validate_url(url: str) -> str:
try:
# Use parse_obj_as to validate the string as an HttpUrl
parse_obj_as(HttpUrl, url)
if url:
# Use parse_obj_as to validate the string as an HttpUrl
parse_obj_as(HttpUrl, url)
return url
except ValidationError:
# Handle the validation error
Expand Down

0 comments on commit 9a9057c

Please sign in to comment.