Thank you Leonel for your time.

The code I showed is a bit simplified. 
I do some validation in deed (to requests.vars and request.args). Even 
though, if there is a problem with request.vars (for example, if 
request.vars.age is a string that is not a digit), the update_record would 
throw some error.

Also, if row is None, it would throw an error inmediately when calling 
update_record(), but notice the error is at the line where the virtual 
method is called, right after running .update_record() succesfully. That is 
what I don't understand, how can row be None if the previous line was 
executed succesfully?

First I thought "maybe the content was deleted by another user, or 
something like that", but that does not make sense, since the function is 
executed inside a database transaction, and there is no commit made between 
the two sentences.
It's also weird that it happens very few times (compared to the times that 
it runs succesfully).

Weird... :/
Anyway, I'll keep monitoring the issue and will try to reproduce it.


El jueves, 12 de julio de 2018, 14:05:35 (UTC-3), Leonel Câmara escribió:
>
> You are not validating request.vars.name nor request.vars.age. Is it 
> possible something weird is going on there? Also you're not checking if row 
> is None initially after you get it using request.args(0).  
>   
> Other than that, I don't see how this is even possible. Because a None Row 
> should cause a problem with update_record to begin with.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to