Mercurial > p > roundup > code
diff roundup/cgi/form_parser.py @ 5067:e424987d294a
Add support for an integer type to join the existing number type.
Commit patch supplied for issue2550886. This can be used for
properties used for ordering, counts etc. where a decimal point
isn't needed. Developed by Anthony (antmail). Doc updates written by
John Rouillard.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 05 Jun 2016 00:17:26 -0400 |
| parents | d2256fcfd81f |
| children | cc4f4ee46d88 |
line wrap: on
line diff
--- a/roundup/cgi/form_parser.py Tue May 31 09:16:09 2016 +0200 +++ b/roundup/cgi/form_parser.py Sun Jun 05 00:17:26 2016 -0400 @@ -135,7 +135,7 @@ they are valid for the class). Otherwise, the property is set to the form value. - For Date(), Interval(), Boolean(), and Number() + For Date(), Interval(), Boolean(), and Number(), Integer() properties, the form value is converted to the appropriate @@ -519,7 +519,7 @@ # some backends store "missing" Strings as empty strings if existing == self.db.BACKEND_MISSING_STRING: existing = None - elif isinstance(proptype, hyperdb.Number): + elif isinstance(proptype, hyperdb.Number) or isinstance(proptype, hyperdb.Integer): # some backends store "missing" Numbers as 0 :( if existing == self.db.BACKEND_MISSING_NUMBER: existing = None
