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:
Leonel Câmara
2016-03-28 14:47:58 +01:00
parent 5cbf381a2c
commit 5c292640ba
2 changed files with 4 additions and 2 deletions
-2
View File
@@ -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 \