Project

General

Profile

Defect #25289 » 25289.patch

Felix Schäfer, 2017-03-08 20:56

View differences:

app/models/member.rb
184 184
      project_ids = Array.wrap(attributes[:project_ids] || attributes[:project_id])
185 185
      role_ids = attributes[:role_ids]
186 186
      project_ids.each do |project_id|
187
        members << Member.new(:principal => principal, :role_ids => role_ids, :project_id => project_id)
187
        member = Member.find_or_new(project_id, principal)
188
        member.role_ids |= role_ids
189
        member.save
190
        members << member
188 191
      end
189
      principal.members << members
190 192
    end
191 193
    members
192 194
  end
    (1-1/1)