Skip to content

Commit 7f39c42

Browse files
committed
Corrected bug in url function
1 parent fa42ff2 commit 7f39c42

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎validators/url.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def url(value, public=False):
8282
if not public:
8383
return pattern.match(value)
8484

85-
if pattern.match(value).groupdict()['private_ip']:
85+
match_result = pattern.match(value)
86+
87+
if match_result.groupdict()['private_ip']:
8688
return False
8789

88-
return True
90+
return match_result

0 commit comments

Comments
 (0)