>
> {{for q in question:}}
> {{q=XML(q.quest.replace('\n','<br>').replace('(','{').replace(')','}'), 
> sanitize=True)}}
> {{pass}}
> ...
>         $(function () {
>            ... 
>
            sendMessage('{{=q}}');
>

When "question" is empty (i.e., there are no answers from the current 
user), the variable "q" will not be defined in the for loop, and therefore 
will result in an exception later where you have {{=q}}.

This doesn't have anything to do with @auth.has_membership('managers'), as 
the error is not even occurring in the function with that decorator. If you 
are expecting "question" to always include some records, you have to figure 
out why you aren't getting any in this case. Otherwise, adjust your code to 
account for the possibility of an empty "question".

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