Den torsdag 26 april 2018 kl. 17:32:56 UTC+3 skrev Anthony: > > On Thursday, April 26, 2018 at 4:07:31 AM UTC-4, Kenneth wrote: >> >> Hi, >> >> correct, no records 24031-24040. I was thinking that my variables maybe >> would have contained something not acceptable so I changed all variables, >> but still can't insert. >> >> Feels like an roolback, but why earth it would do something like that I >> don't understand. There definitly aren't any roolbacks in the code as I >> didn't know there was anything like that. >> > > How are you running the controller function repeatedly? Are you able to > observe whether each run is generating an exception? Maybe check your MySQL > logs to determine exactly what queries are being issued. > > Anthony >
Just accessing the URL runs the controller. Never had to enable MySQL logging and looking at each query to find an problem this before. Very interesting. There really is an Rollback issued when inserting fails. I found out when the Rollback is issued but not yet why. tracker = db.usage_tracker.insert(client = int(user_data.id), product_group = 2, product = int(access_code)) company = db(db.customer_company.id == user_data.cc).select() If user_data.cc is None then an Rollback is issued, any ideas why? If user_data.cc is an value then no Rollback. I can of course beat this with an if None but I don't understand why this happens. Kenneth -- 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.

