Yes. There are 2 web2py bugs here. The first one that is probably affecting
you is that auth.user which is cached in the session is not being updated
with the thumbnail values. The second one you can read about here:
https://groups.google.com/forum/#!topic/web2py-developers/gwEr1cHQNAY
Anyway, while these aren't fixed, here's a dirty workaround:
## TODO: remove me when fixed, this is to avoid a bug with computed fields
not being updated in session
def force_compute_fields(form):
if auth.user:
user = db.auth_user[form.vars.id]
table_user = auth.table_user()
computed_field_functions = {f:table_user[f].compute for f in
table_user.fields if table_user[f].compute}
user.update_record(**{f:y(user) for f,y in computed_field_functions.
iteritems()})
auth.user.update({f:user[f] for f in computed_field_functions}) #
Update session values as well
auth.settings.register_onaccept = auth.settings.profile_onaccept = [
force_compute_fields]
# end
--
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.