>
> which I changed now to this
>
>   elif request.post_vars.modified_on != str(db.client(request.vars.id).
> modified_on):
>      session.flash = T('Record was changed while you were editing. '
>                        'This is the updated record.')
>      redirect(URL(args=request.args, vars=request.get_vars, user_signature
> =True))
>

Why not put the above inside the "edit" condition, as it is not relevant 
otherwise (and won't work on record creation)? Also, given that this is in 
the onvalidation function, why not use form.record rather than 
unnecessarily re-selecting the record via db.client(request.vars.id)?

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

Reply via email to