Skip to content

Commit bbe77d6

Browse files
Merge pull request #84 from sightmachine/ENG-6231
ENG-623: default domain added if url does not endswith default domain
2 parents 84ce62a + 01eede1 commit bbe77d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

smsdk/client_v0.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ def convert_to_valid_url(
112112
if "." not in domain:
113113
domain = f"{domain}.{default_domain}"
114114

115+
# Check if domain endswith default domain
116+
if not domain.endswith(default_domain):
117+
domain = f"{domain}.{default_domain}"
118+
115119
# Construct the valid URL
116120
valid_url = f"{protocol}://{domain}"
117121

0 commit comments

Comments
 (0)