I'm running Version 1.99.2.

# model
db.define_table('test',
 
Field('user_id',db.auth_user,requires=IS_NULL_OR(IS_IN_DB(db,'auth_user.id'))),
  Field('session_id',default=resposne.session_id),
...
)


# at some point, the following would be executed:

test_id=db.test.insert(
  user_id=auth.user.id if auth.is_logged_in() else None,
)


# in the index controller there is the following test condition
def index():
...
    if auth.is_logged_in():
        db((db.test.user_id==None) &
(db.test.session_id==response.session_id)).update(user_id=auth.user.id,session_id=None)

...

Here's the problem. db.test.user_id is getting properly updated to the
logged in auth.user.id. However, session_id is not getting set to
None. Anybody see what I could be doing wrong?

Reply via email to