Hi, Just so it's clear for anyone having the same issue, Anthony's tip was right on target. All is working now. Conclusion: you must use the update_record(field=new_value) format if you're using authentication, and not the update_record() format.
Thanks again to all that chipped in and Anthony for the solution. Ricardo. On Tuesday, January 10, 2017 at 11:43:27 AM UTC, Ricardo Oliveira wrote: > > Ah.. that should explain it then. In that case I'll have to do an update > call with each of the update fields named individually. > That would be something nice to have in the book, I agree :) > > Thanks Anthony, I'm going to test it now. > > On Monday, January 9, 2017 at 10:10:23 PM UTC, Anthony wrote: >> >> record = db(db.table_x.id == row_id).select().first() >>> record['name'] = 'something else' >>> record.update_record() >>> >>> That's the one way you cannot do it. The problem is when you call >> .update_record() with no arguments, it takes all the existing fields in the >> record and uses them in the database update. It will therefore use the >> existing values of modified_by and modified_on. Typically, modified_by and >> modified_on get updated because they are excluded from the update call, >> which prompts the DAL to fill their values in automatically. But this >> mechanism breaks down when calling .update_record() with no arguments. We >> should probably add a note about this in the book. >> >> Anthony >> > -- 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.

