Hello Mark, Not sure about the bool part, I think web2py treat bool like that to comply with all the different backend and the apdater does the rest...
On the other hand I am curious that you update row with simple update(), you suppose to use update_record() Ref: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#update_record Richard On Wed, Apr 6, 2016 at 2:06 AM, Mark Graves <[email protected]> wrote: > Hey everyone, > > I saw a random bug in an app I'm working on, and I was wondering what the > correct approach is. > > I have auth.settings.extra_fields["auth_user"] = [LIST_OF_FIELDS] > > later, I select that row and get it as a dict: > > row = db(db.auth_user.id == user_id).select().first().as_dict() > > then I get the extra fields and set them as normal attributes of the table > > _f = row["extra"] > > row.update(_f) > > The problem is, some of these extra fields are booleans, but they are > getting returned via JSON as "F" or "T" > > I think its happening in the as_dict() method of the row object where it > says: > > d = dict(self) > where self is a row object > > Any thoughts? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

