diff --git a/filters/validations.py b/filters/validations.py index 681180a..5cb8f95 100644 --- a/filters/validations.py +++ b/filters/validations.py @@ -103,7 +103,13 @@ def fn(value): try: if isinstance(value, unicode): if ',' in value: - value = map(int, filter(bool, value.split(','))) + value = map( + int, filter( + bool, map( + lambda x: x.strip(), value.split(',') + ) + ) + ) return value else: return int(value) diff --git a/setup.py b/setup.py index bd89527..1a2e0ca 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) __name__ = 'drf-url-filters' -__version__ = '0.1.3' +__version__ = '0.1.4' __author__ = 'Manjit Kumar' __author_email__ = 'manjit1727@gmail.com' __url__ = 'https://github.com/manjitkumar/drf-url-filters'