#760: Problems using Catwalk to set fields to NULL (or None)
-------------------------------------------+--------------------------------
 Reporter:  anonymous                      |        Owner:  Chris Arndt 
     Type:  defect                         |       Status:  new         
 Priority:  normal                         |    Milestone:  1.0.x bugfix
Component:  Toolbox.Catwalk                |      Version:  1.0         
 Severity:  normal                         |   Resolution:              
 Keywords:  needs patch, catwalk, decimal  |  
-------------------------------------------+--------------------------------
Changes (by Chris Arndt):

  * keywords:  needs confirmation, needs review => needs patch, catwalk,
               decimal

Comment:

 I can confirm that this is still a problem in TG 1.1rc1 and TG 1.0 SVN
 r6685 but the fix given in the comment above does not fix the issue, it
 only adds support to display decimal columns properly.

 The cause of the the problem is in
 `toolbox.catwalk.CatWalk.extract_decimal_value`, which only catches
 `ValueError` when trying to convert the request param into a `Decimal`
 object. It should also catch `TypeError` and `decimal.InvalidOperation`.
 Also the `extract_parameters` does not seem to check if a column has
 `notNone` set to `False`, so fixing `extract_decimal_value` would set
 empty decimal fields to `Decimal(0.0)`.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/760#comment:8>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to