Allow 'None' to be set on an Array attribute
This commit is contained in:
parent
39e5762873
commit
b8de4600e0
@ -38,6 +38,8 @@ class ArrayType(object):
|
||||
return self._item_type
|
||||
|
||||
def validate(self, value):
|
||||
if value is None:
|
||||
return
|
||||
if not isinstance(value, list):
|
||||
raise ValueError("Wrong type. Expected '[%s]', got '%s'" % (
|
||||
self.item_type, type(value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user