It's one of the dal shortcuts. Similar to db.mytable[0] = dict(myfield='somevalue')
The first one should raise an exception, but instead it inserts a record and ignores the misnamed field. On Thursday, March 7, 2013 11:03:47 AM UTC-5, Niphlod wrote: > > I quite don't get the issue: what are you trying to do with those dicts ? > > On Thursday, March 7, 2013 4:54:25 PM UTC+1, Cliff Kachinske wrote: >> >> I don't know why this code does not fail. It seems like it should >> because there is no file 'sale_product_id' in the table. >> >> lots = db.customer_order_product_lots >> lots[0] = dict( >> >> customer_order_product_id=customer_order_product_id, >> sale_product_id=request.args(0), >> quantity_allocated=v, >> requested_ship_date=form.vars[req_date], >> ship_date=form.vars[act_date], >> ) >> >> The code should look like this: >> lots = db.customer_order_product_lots >> lots[0] = dict( >> >> customer_order_product_id=customer_order_product_id, >> production_job_id=production_job_id, >> quantity_allocated=v, >> requested_ship_date=form.vars[req_date], >> ship_date=form.vars[act_date], >> ) >> >> Can anyone tell me what's going on? >> Thanks, >> Cliff Kachinske >> > -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.