From 8ea1dafe83da0b018dcc413242194749afd0e05a Mon Sep 17 00:00:00 2001
From: James Lopez <james@jameslopez.es>
Date: Tue, 31 Jan 2017 19:20:35 +0100
Subject: [PATCH] use destroy_all

---
 lib/gitlab/import_export/members_mapper.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/gitlab/import_export/members_mapper.rb b/lib/gitlab/import_export/members_mapper.rb
index 6189867dc9c..a09577ae48d 100644
--- a/lib/gitlab/import_export/members_mapper.rb
+++ b/lib/gitlab/import_export/members_mapper.rb
@@ -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
-- 
GitLab