Modify ↓
#13011 closed defect (fixed)
When cost field is empty, TypeError float() argument must be a string or a number
| Reported by: | Kirk | Owned by: | Kirk |
|---|---|---|---|
| Priority: | normal | Component: | BudgetingPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 1.2 |
Description
trac error log
2016-12-22 07:50:43,835 Trac[ticketbudgeting] ERROR: Error executing SQL Statement SELECT position, username, type, estimation, cost, status,
comment FROM budgeting WHERE ticket=2318 ORDER BY position
Error: ('budgeting.cost', TypeError('float() argument must be a string or a number',))
Attachments (0)
Change History (3)
comment:1 Changed 9 years ago by
comment:3 Changed 9 years ago by
| Owner: | changed from Franz to Kirk |
|---|
Note: See
TracTickets for help on using
tickets.



Fix:
Index: ticketbudgeting/ticketbudgeting.py =================================================================== --- ticketbudgeting/ticketbudgeting.py (revision 16144) +++ ticketbudgeting/ticketbudgeting.py (working copy) @@ -52,7 +52,7 @@ def get_float(value, fld='UNKNOWN FIELD'): ret_val = 0 try: - if value == '': + if value is None or value == '': ret_val = 0 else: try: