Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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


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 2 years ago by Kirk


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

comment:2 Changed 2 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 16145:

0.6.6dev: Fix TypeError with empty cost field

Patch by linefeed. Fixes #13011.

comment:3 Changed 2 years ago by Ryan J Ollos

Owner: changed from Franz to Kirk

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Kirk.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.