Module None, line 45, in copy_of_stats_output_branch <PythonScript at copy_of_stats_output_branch> Line 45 for j in self.sql.sqlGetStatDetailsSum(date1=i.date, branch1=i.branch, category1=i.category, timeCheck1=k): if str(j.sum_renewals)== 'None': line 45 --> j.sum_renewals = 0 elif str(j.sum_registrations)== 'None': j.sum_renewals = 0 elif str(j.sum_hours)== 'None': j.sum_renewals = 0 elif str(j.sum_reference)== 'None': j.sum_renewals = 0 When I have values returned by the sql call it works fine but as soon as I get to a field that has a 0 in it then I get an error... As far as I can tell I'm doing the assignment correctly ... what's wrong here? Kate