Commit eea56c96 authored by Maxim's avatar Maxim
Browse files

Fixed members added

parent f571fcfb
......@@ -53,7 +53,7 @@ class GroupController < ApplicationController
return head :not_found if uid.nil?
return head :conflict unless Group.get_members(params[:gid]).filter { |m| m.id == Integer(uid) }.empty?
return head :conflict unless Group.get_members(params[:gid], nil)[0].filter { |m| m.id == Integer(uid) }.empty?
Group.add_user(group_id, uid)
Role.add_roles(group_id, { uid => Roles::MEMBER })
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment