summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-06-07 13:26:24 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-06-08 11:31:53 +0200
commit13bd4b028a5d83e63026dc0023c090c677fceb3b (patch)
tree70dfc41d5e62b6085324eeb8d6a481b3af5b29f7
parent71103985f9ae995adf8fb064d2895cab9b2bc0cd (diff)
downloadgitlab-ce-13bd4b028a5d83e63026dc0023c090c677fceb3b.tar.gz
Split Project#reset_cache_and_import_attrs up
In EE we don't want to remove import data for mirrors. By moving this logic to a separate method we can simply re-define the method in EE using "prepend" and call "super" whenever necessary.
-rw-r--r--app/models/project.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 0de9d6cb181..4c394646787 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -478,7 +478,11 @@ class Project < ActiveRecord::Base
ProjectCacheWorker.perform_async(self.id)
end
- self.import_data&.destroy
+ remove_import_data
+ end
+
+ def remove_import_data
+ import_data&.destroy
end
def import_url=(value)