summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2016-12-19 15:08:17 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2016-12-19 15:08:17 +0000
commitffcd20cec8b848e24b54fc37658d9841d34f5c35 (patch)
tree5cf52116f191549d2abc2cf279913a45b4eaa08e /lib/gitlab
parent16f950b4c321708c8701e031316b5ed91c50f2eb (diff)
parent527428a78ed4834b936b0aa7a6da430bf66baa2d (diff)
downloadgitlab-ce-ffcd20cec8b848e24b54fc37658d9841d34f5c35.tar.gz
Merge branch 'fix/import-export-build-token' into 'master'
Fix duplicated build token problem importing projects Reset token so duplicated builds do not thrown an error on import - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23475 See merge request !8171
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/import_export/relation_factory.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index a0e80fccad9..9b590bcee8d 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -99,6 +99,8 @@ module Gitlab
def generate_imported_object
if BUILD_MODELS.include?(@relation_name) # call #trace= method after assigning the other attributes
trace = @relation_hash.delete('trace')
+ @relation_hash.delete('token')
+
imported_object do |object|
object.trace = trace
object.commit_id = nil