summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorTravis Miller <travis@travismiller.com>2018-02-28 21:25:54 -0600
committerTravis Miller <travis@travismiller.com>2018-02-28 21:25:54 -0600
commit2b176137c9b5617d38ff89b6f8ed4636018916c9 (patch)
tree764d53a280c42e000820f1e8c80ec7e41ca70dbd /app/models/project.rb
parent0d8aadeb9df3bd5e4f18e8c22510c2220b74420d (diff)
downloadgitlab-ce-2b176137c9b5617d38ff89b6f8ed4636018916c9.tar.gz
review: instantiate shared import/export object in project method
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 62a3b655ad1..190473aa196 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1557,10 +1557,14 @@ class Project < ActiveRecord::Base
end
end
+ def import_export
+ @import_export ||= Gitlab::ImportExport::Shared.new(self)
+ end
+
def export_path
return nil unless namespace.present? || hashed_storage?(:repository)
- Gitlab::ImportExport::Shared.new(self).archive_path
+ import_export.archive_path
end
def export_project_path
@@ -1578,7 +1582,7 @@ class Project < ActiveRecord::Base
end
def export_in_progress?
- Gitlab::ImportExport::Shared.new(self).active_export_count > 0
+ import_export.active_export_count > 0
end
def remove_exports