fixed #1111, Validator IS_IPV4: options is_private=False not working, thanks Nbushkov
This commit is contained in:
+2
-1
@@ -3366,7 +3366,8 @@ class IS_IPV4(Validator):
|
|||||||
(number == self.localhost)):
|
(number == self.localhost)):
|
||||||
ok = False
|
ok = False
|
||||||
if not (self.is_private is None or self.is_private ==
|
if not (self.is_private is None or self.is_private ==
|
||||||
(sum([number[0] <= number <= number[1] for number in self.private]) > 0)):
|
(sum([private_number[0] <= number <= private_number[1]
|
||||||
|
for private_number in self.private]) > 0)):
|
||||||
ok = False
|
ok = False
|
||||||
if not (self.is_automatic is None or self.is_automatic ==
|
if not (self.is_automatic is None or self.is_automatic ==
|
||||||
(self.automatic[0] <= number <= self.automatic[1])):
|
(self.automatic[0] <= number <= self.automatic[1])):
|
||||||
|
|||||||
Reference in New Issue
Block a user