Changeset - 2c08b6929b1c
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-10-17 15:48:19
marcin@python-works.com
fixes #276, when adding an single user into users group with id >= 10 a call to set was invoked on string instead of a list which lead to creating an set from digits that id was combined with.
1 file changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/db.py
Show inline comments
 
@@ -422,10 +422,9 @@ class UsersGroup(Base, BaseModel):
 
                    Session.flush()
 
                    members_list = []
 
                    if v:
 
                        for u_id in set(v):
 
                            members_list.append(UsersGroupMember(
 
                                                            users_group_id,
 
                                                            u_id))
 
                        for u_id in set(list(v)):
 
                            member = UsersGroupMember(users_group_id,u_id)
 
                            members_list.append(member)
 
                    setattr(users_group, 'members', members_list)
 
                setattr(users_group, k, v)
 

	
0 comments (0 inline, 0 general)