Hmmm it's 2.6....

On Jun 27, 4:26 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Are you using Python 2.5 or Python 2.6?
>
> Massimo
>
> On Jun 27, 9:16 am, pigmej <pig...@gmail.com> wrote:
>
> > traceback:
> > Traceback (most recent call last):
> >   File "/home/pigmej/moje/web2py/gluon/restricted.py", line 107, in
> > restricted
> >     exec ccode in environment
> >   File "/home/pigmej/moje/web2py/applications/manager/controllers/
> > default.py", line 167, in <module>
> >   File "/home/pigmej/moje/web2py/gluon/globals.py", line 100, in
> > <lambda>
> >     self._caller = lambda f: f()
> >   File "/home/pigmej/moje/web2py/gluon/tools.py", line 1307, in f
> >     if not self.has_permission(name, table_name, record_id):
> >   File "/home/pigmej/moje/web2py/gluon/tools.py", line 1435, in
> > has_permission
> >     == record_id).select(permission.group_id)
> >   File "/home/pigmej/moje/web2py/gluon/sql.py", line 1601, in __eq__
> >     return SQLQuery(self, '=', value)
> >   File "/home/pigmej/moje/web2py/gluon/sql.py", line 1918, in __init__
> >     right = sql_represent(right, left.type, left._db._dbname)
> >   File "/home/pigmej/moje/web2py/gluon/sql.py", line 377, in
> > sql_represent
> >     return str(int(obj))
> > TypeError: int() argument must be a string or a number, not 'list'
>
> > in admin everything works fine.
>
> > In my app not:
> > On adding new "project" I'm doing this:
> >         group_id=auth.add_group(role="xxx_
> > %s"%form.vars.id,description="some descr %s"%form.vars.id)
> >         auth.add_membership(group_id,auth.user.id)
> >         auth.add_permission
> > (group_id,"update",db.projects,form.vars.id)
>
> > viewing, creating new records works.
>
> > But when I'm trying to update record ( function decorated by:
> > @auth.requires_permission("update","projects",request.vars.id) )
> >     form=crud.update(db.projects,request.vars.id)
> > form is showing correctly, but after submitting form it crashes
> > ( traceback at the beginning )
> > The same error is without crud ( custom form )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to