I'm pulling a row from a db and adding up the fields (approx 15) to get a total. But some field values will be Null, which causes an error in the addition of the fields (TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
)
Right now, with each field, I get the field value and set it to 'x#', then check if it is None and if so set 'x#' to 0.
Not very elegant...any advice on a better way to deal with this in python?
cc