use destroy_all

This commit is contained in:
James Lopez 2017-01-31 19:20:35 +01:00
parent dc58df4160
commit 8ea1dafe83

View file

@ -41,9 +41,7 @@ module Gitlab
end
def ensure_default_member!
@project.project_members.each do |member|
member.destroy
end
@project.project_members.destroy_all
ProjectMember.create!(user: @user, access_level: ProjectMember::MASTER, source_id: @project.id, importing: true)
end