Skip to content

Commit

Permalink
fix(utils): only verify netloc if scheme isn't data (#250)
Browse files Browse the repository at this point in the history
Fixes #249
  • Loading branch information
ashjorda authored Jan 17, 2025
2 parents 99a570d + 2f12231 commit 8d26a00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webexpythonsdk/models/cards/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ def validate_uri(
if not parsed_uri.scheme:
raise URIException("Invalid URI: Missing scheme")

# Check if the URI has a heir-part location
if not parsed_uri.netloc:
# Check if the URI has a heir-part location if scheme isn't "data"
if parsed_uri.scheme != "data" and not parsed_uri.netloc:
raise URIException("Invalid URI: Missing heir part location")

# Return if every check is passed
Expand Down

0 comments on commit 8d26a00

Please sign in to comment.