for such operations i use, for example, review.votes = review.votes if review.votes is not None else 0 so i can do operations on it.
On Mar 3, 10:26 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > I can see there is a bug in web2py in that respect since it assumes > integer while it should be of the same type as the field being summed. > I fixed it in trunk. Anyway, that is not your problem. can I see how > you are using it? > > On Mar 3, 1:39 pm, Philip <philip.el...@gmail.com> wrote: > > > > > I have a DAL field of type 'double'. What python data type is > > row._extra[db.table.field.sum()] for that field? > > > Assuming it was a python float, I tried to perform an arithmetic > > operation on it, and an error came back that the type was 'NoneType' > > so the operation could not be performed. I can't tell if this is an > > error on my part. > > > Thanks, > > Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.