Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2019-05-06 16:15:03 +0300
committerNick Thomas <nick@gitlab.com>2019-05-06 16:15:03 +0300
commit18c07084a6faea04ab446e523fff603843406ac8 (patch)
treeb13bd44f9f56f32afb4ed387284e45102d653a4f /app/assets/javascripts/mirrors/mirror_repos.js
parent53823531ff88f8c568973841fac66e3629df7522 (diff)
Destroy repo mirrors instead of disabling them
It is important to destroy data related to repo mirrors when they are disabled. Use `_destroy` nested attribute instead of `enabled` for push mirrors. Call `remove_import_data` after saving a project if its pull mirror is disabled.
Diffstat (limited to 'app/assets/javascripts/mirrors/mirror_repos.js')
-rw-r--r--app/assets/javascripts/mirrors/mirror_repos.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/mirrors/mirror_repos.js b/app/assets/javascripts/mirrors/mirror_repos.js
index 196b84621b6..33e9b1c4e46 100644
--- a/app/assets/javascripts/mirrors/mirror_repos.js
+++ b/app/assets/javascripts/mirrors/mirror_repos.js
@@ -87,7 +87,7 @@ export default class MirrorRepos {
project: {
remote_mirrors_attributes: {
id: $target.data('mirrorId'),
- enabled: 0,
+ _destroy: 1,
},
},
};