Changeset 457


Ignore:
Timestamp:
09/12/08 14:36:31 (5 years ago)
Author:
cbalan
Message:

UserManager?: - Fixed get_usernames_with_attributes's sql.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/usermanagerplugin/tracusermanager/api.py

    r455 r457  
    470470                    return "name=%s AND value " + (k.startswith('NOT_') and 'NOT' or '') + " LIKE %s" 
    471471                     
    472                 cursor.execute("SELECT sid, count(sid) cnt" 
     472                cursor.execute("SELECT sid" 
    473473                               " FROM session_attribute" 
    474474                               " WHERE " + " OR ".join([ _get_condition(k,v) for k,v in attributes_dict.items()]) + 
    475475                               " GROUP BY sid" 
    476                                " HAVING cnt=%s", attributes_list) 
    477                  
    478             return [id for id, cnd in cursor] 
     476                               " HAVING count(*)=%s", attributes_list) 
     477            return [id for id, in cursor] 
    479478        except Exception, e: 
    480479            out = StringIO() 
Note: See TracChangeset for help on using the changeset viewer.