I have never had problems with the flash helper, even when I heavily
customized it, but today I noticed something strange, this seemingly
harmless code:
session.flash = user[0].user_name # This is a string field in the db
or
session.flash = str(user[0].user_name)
or
session.flash = str(user[0].id)
Always results in this:
Traceback (most recent call last):
File "D:\_Projects\TestSite\Website\TestSite\gluon\restricted.py",
line 62, in restricted
exec ccode in environment
File "D:\_Projects\TestSite\Website\TestSite\applications\init/
controllers/accounts.py", line 916, in <module>
File "D:\_Projects\TestSite\Website\TestSite\gluon\globals.py", line
55, in <lambda>
self._caller=lambda f: f()
File "D:\_Projects\TestSite\Website\TestSite\applications\init/
controllers/accounts.py", line 586, in manage_account
session.flash = user[0].user_name #T("Update successful")
File "D:\_Projects\TestSite\Website\TestSite\gluon\sql.py", line
1236, in __getitem__
if field.type[:9]=='reference':
AttributeError: 'str' object has no attribute 'type'
I hope its just my lack of sleep :-), Does anyone see anything wrong?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---