On Friday, February 26, 2016 at 10:51:58 AM UTC-5, Massimo Di Pierro wrote: > > you have > > hist_id = db.sales_cycle_history.insert(sales_cycle_id=scid, ...) > > so you should do > > row = db(db.sales_cycles.id == hist_id).select().first() > > or > > row = db(db.sales_cycles.sales_cycle_id == scid).select().first() > > but NOT > > row = db(db.sales_cycles.id == scid).select().first() >
Note, the query is on the db.sales_cycle table, but hist_id is the id of a record inserted into a *different *table (db.sales_cycle_history). He also claims to get an actual record returned when passing the row to response.json (i.e., mysteriously, it is not None in that case). I think we need to see more code. 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.

