Comment 3 for bug 1319997

Revision history for this message
Tao Zhou (angeloudy) wrote :

The fix doesn't solve the issue for me.
After I added the check for username, I encountered the error below:

  user_ref = session.query(User).get(user_id)
2014-07-09 17:48:16.723 34040 TRACE keystone.common.wsgi File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 805, in get
2014-07-09 17:48:16.723 34040 TRACE keystone.common.wsgi if len(ident) != len(mapper.primary_key):
2014-07-09 17:48:16.723 34040 TRACE keystone.common.wsgi TypeError: object of type 'NoneType' has no len()

This is because username is None, which results in a None user_id.
The problem is why username is None.