def _apply(self, value):
value = super(Array, self)._apply(value) # type: Sequence
if self._has_errors:
return None
if isinstance(value, (binary_type, text_type)):
return self._invalid_value(
value = value,
reason = self.CODE_WRONG_TYPE,
template_vars = {
'incoming': self.get_type_name(type(value)),
'allowed': self.get_allowed_type_names(),
},
)
return value
评论列表
文章目录