Complete coverage for IS_IN_SET
Removed unreachable code in IS_IN_SET
if failures and self.theset:
if self.multiple and (value is None or value == '')
It's impossible to have *failures* and have value be None or '' at the same time
This commit is contained in:
@@ -471,8 +471,6 @@ class IS_IN_SET(Validator):
|
||||
thestrset = [str(x) for x in self.theset]
|
||||
failures = [x for x in values if not str(x) in thestrset]
|
||||
if failures and self.theset:
|
||||
if self.multiple and (value is None or value == ''):
|
||||
return ([], None)
|
||||
return (value, translate(self.error_message))
|
||||
if self.multiple:
|
||||
if isinstance(self.multiple, (tuple, list)) and \
|
||||
|
||||
Reference in New Issue
Block a user