settings: fix incorrect logic in range acceptable method

This commit is contained in:
Peter F. Patel-Schneider 2026-05-12 08:53:16 -04:00
parent 1952e9ce98
commit 22a457da9a
1 changed files with 1 additions and 1 deletions

View File

@ -565,7 +565,7 @@ class RangeValidator(Validator):
def acceptable(self, args, current):
arg = args[0]
# None if len(args) != 1 or type(arg) != int or arg < self.min_value or arg > self.max_value else args)
return None if len(args) != 1 or isinstance(arg, int) or arg < self.min_value or arg > self.max_value else args
return None if len(args) != 1 or not isinstance(arg, int) or arg < self.min_value or arg > self.max_value else args
def compare(self, args, current):
if len(args) == 1: