Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vibora/schemas/extensions/fields.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ cdef class Integer(Field):
raise ValidationError(error_code=Messages.MUST_BE_INTEGER, field=self.load_from)
try:
return int(value)
except ValueError:
except (ValueError, TypeError):
raise ValidationError(error_code=Messages.MUST_BE_INTEGER, field=self.load_from)


Expand All @@ -115,7 +115,7 @@ cdef class Number(Field):
raise ValidationError(error_code=Messages.MUST_BE_NUMBER, field=self.load_from)
try:
return float(value)
except ValueError:
except (ValueError, TypeError):
raise ValidationError(error_code=Messages.MUST_BE_NUMBER, field=self.load_from)


Expand Down