error 500 after adding user to group [sqlite]

Issue #276 resolved
Denis Savenko created an issue

When i trying to add to group new user with {{{ID}}} > 9 something strange happens: to table {{{users_groups_members}}} was written 2 records instead of 1. For example, I adding user {{{#10}}} to group {{{#6}}}, in result i got following records in database: {{{ users_group_member_id users_group_id user_id 1 6 1 2 6 0 }}} When i waiting for: {{{ users_group_member_id users_group_id user_id 1 6 10 }}}

In result, when {{{user_id}}} contents 0 or other non-existent {{{id}}}, i got internal server error when trying to see user groups list with following error in log: {{{ File '/var/mercurial/rhodecode/config/data/templates/admin/users_groups/', line 88 in render_main __M_writer(escape(', '.join([x.user.username for x in u_group.members[:50]]))) AttributeError: 'NoneType' object has no attribute 'username' }}} Full error backtrace attached to this issue

Comments (5)

  1. Les Peabody

    I can confirm having applied both patches that adding users with an id >= 10 works now and does not result in a 500 HTTP status code.

  2. Log in to comment