Skip to content

Commit 652f8fe

Browse files
committed
Fix ArrayDecimalField clean method
value could be None when the clean method gets called, if so then we should return None
1 parent 78ad54a commit 652f8fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rest_framework_filters/fields.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
class ArrayDecimalField(forms.DecimalField):
44
def clean(self, value):
5+
if value is None:
6+
return None
7+
58
out = []
69
for val in value.split(','):
710
out.append(super(ArrayDecimalField, self).clean(val))

0 commit comments

Comments
 (0)