changeset 1576:2c08b6929b1c beta

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.
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 17 Oct 2011 15:48:19 +0200
parents a9888895b60d
children 534b9c0a5646 0b63a0d2cede
files rhodecode/model/db.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/model/db.py	Mon Oct 17 01:48:00 2011 +0200
+++ b/rhodecode/model/db.py	Mon Oct 17 15:48:19 2011 +0200
@@ -422,10 +422,9 @@
                     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)