comparison 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
comparison
equal deleted inserted replaced
5066:d2256fcfd81f 5067:e424987d294a
361 value = date.Date(value) 361 value = date.Date(value)
362 elif isinstance(prop, hyperdb.Boolean): 362 elif isinstance(prop, hyperdb.Boolean):
363 value = value.lower() in ('yes', 'true', 'on', '1') 363 value = value.lower() in ('yes', 'true', 'on', '1')
364 elif isinstance(prop, hyperdb.Number): 364 elif isinstance(prop, hyperdb.Number):
365 value = float(value) 365 value = float(value)
366 elif isinstance(prop, hyperdb.Integer):
367 value = int(value)
366 d[name] = value 368 d[name] = value
367 elif exists: 369 elif exists:
368 # nuke the existing value 370 # nuke the existing value
369 if isinstance(prop, hyperdb.Multilink): 371 if isinstance(prop, hyperdb.Multilink):
370 d[name] = [] 372 d[name] = []

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