diff roundup/cgi/actions.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 dce3cfe7ec61
children 9954a358da18
line wrap: on
line diff
--- a/roundup/cgi/actions.py	Tue May 31 09:16:09 2016 +0200
+++ b/roundup/cgi/actions.py	Sun Jun 05 00:17:26 2016 -0400
@@ -363,6 +363,8 @@
                         value = value.lower() in ('yes', 'true', 'on', '1')
                     elif isinstance(prop, hyperdb.Number):
                         value = float(value)
+                    elif isinstance(prop, hyperdb.Integer):
+                        value = int(value)
                     d[name] = value
                 elif exists:
                     # nuke the existing value

Roundup Issue Tracker: http://roundup-tracker.org/