Hello, I'm trying to edit the group membership for a user, I have in my
controller:
def change_membership():
if request.vars.id:
row = db(db.auth_membership.user_id == request.vars.id).select()
id = row[0].id
form = SQLFORM(db.auth_membership,
id,
fields=['group_id'],
_action=URL()
)
if form.process().accepted:
...redirect back to user list
if form.errors:
response.flash = 'form has errors'
return dict(form=form)
But It doesn't work, I get a :
<type 'exceptions.IndexError'> list index out of range
I know that only get one row, but I don't understand why its seems empty..
Thanks in advance
Christian
--