We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79b89a7 commit 6b83801Copy full SHA for 6b83801
filters/validations.py
@@ -96,8 +96,8 @@ def fn(value):
96
def CSVofIntegers(msg=None):
97
'''
98
Checks whether a value is list of integers.
99
- Returns list of integers or just an integer
100
- if there is only one element in list.
+ Returns list of integers or just one integer in
+ list if there is only one element in given CSV string.
101
102
def fn(value):
103
try:
@@ -112,7 +112,7 @@ def fn(value):
112
)
113
return value
114
else:
115
- return int(value)
+ return [int(value)]
116
except ValueError:
117
raise Invalid(
118
'<{0}> is not a valid csv of integers'.format(value)
0 commit comments