[#809] Fixed a nil object error in params.
This commit is contained in:
parent
a3b1127ef8
commit
66fe8287ce
|
@ -131,7 +131,7 @@ class GroupsController < ApplicationController
|
||||||
|
|
||||||
if params[:project_ids] # Multiple memberships, one per project
|
if params[:project_ids] # Multiple memberships, one per project
|
||||||
params[:project_ids].each do |project_id|
|
params[:project_ids].each do |project_id|
|
||||||
@membership = Member.edit_membership(params[:membership_id], params[:membership].merge(:project_id => project_id), @group)
|
@membership = Member.edit_membership(params[:membership_id], (params[:membership]|| {}).merge(:project_id => project_id), @group)
|
||||||
@membership.save if request.post?
|
@membership.save if request.post?
|
||||||
end
|
end
|
||||||
else # Single membership
|
else # Single membership
|
||||||
|
|
|
@ -199,7 +199,7 @@ class UsersController < ApplicationController
|
||||||
def edit_membership
|
def edit_membership
|
||||||
if params[:project_ids] # Multiple memberships, one per project
|
if params[:project_ids] # Multiple memberships, one per project
|
||||||
params[:project_ids].each do |project_id|
|
params[:project_ids].each do |project_id|
|
||||||
@membership = Member.edit_membership(params[:membership_id], params[:membership].merge(:project_id => project_id), @user)
|
@membership = Member.edit_membership(params[:membership_id], (params[:membership] || {}).merge(:project_id => project_id), @user)
|
||||||
@membership.save if request.post?
|
@membership.save if request.post?
|
||||||
end
|
end
|
||||||
else # Single membership
|
else # Single membership
|
||||||
|
|
Loading…
Reference in New Issue