Changeset - 8b08599d4b08
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-03-06 16:21:24
madski@unity3d.com
db: fix beaker cache key for user groups - don't collide with users
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/model/db.py
Show inline comments
 
@@ -836,13 +836,13 @@ class UserGroup(Base, BaseModel):
 
            q = cls.query().filter(cls.users_group_name.ilike(group_name))
 
        else:
 
            q = cls.query().filter(cls.users_group_name == group_name)
 
        if cache:
 
            q = q.options(FromCache(
 
                            "sql_cache_short",
 
                            "get_user_%s" % _hash_key(group_name)
 
                            "get_group_%s" % _hash_key(group_name)
 
                          )
 
            )
 
        return q.scalar()
 

	
 
    @classmethod
 
    def get(cls, user_group_id, cache=False):
0 comments (0 inline, 0 general)