Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Handle None value when convertin to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
toirl committed Aug 29, 2017
1 parent 2853601 commit 99e5c2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formbar/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def to_integer(value):
"""Converts a given string value into a 4 byte integer value. If
the given value is larger the a 4 byte integer a OverflowError is
raised."""
if value == "":
if value == "" or value is None:
return None
try:
value = int(value)
Expand Down

0 comments on commit 99e5c2f

Please sign in to comment.