Skip to content

Commit f17e865

Browse files
committed
Fix FilterValueError
Fix bug introduced during refactoring where we assumed all filters but be of instance BaseFilter which is of course wrong.
1 parent 2a5d73f commit f17e865

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adminapi/filters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212

1313
class BaseFilter(object):
1414
def __init__(self, value):
15-
ok_datatypes = tuple([bool, int, float] + [s[0] for s in STR_BASED_DATATYPES])
16-
if type(self) is BaseFilter and isinstance(value, ok_datatypes):
15+
ok_datatypes = tuple([int, float] + [s[0] for s in STR_BASED_DATATYPES])
16+
if type(self) is BaseFilter and isinstance(value, bool):
17+
pass
18+
elif isinstance(value, ok_datatypes):
1719
pass
1820
elif isinstance(value, str):
1921
for char in '\'"':

0 commit comments

Comments
 (0)