diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2016-12-19 15:08:17 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-21 12:23:41 -0200 |
commit | b9ed15e22b644e3c19e6c7ca95b67556827fae58 (patch) | |
tree | f4c842ec9f8fae273f3f82cba9f7e3121398b5fb /lib | |
parent | e38a6f4ab5dcfccccc3b2e490b5542e2bbe32dc9 (diff) | |
download | gitlab-ce-b9ed15e22b644e3c19e6c7ca95b67556827fae58.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')
-rw-r--r-- | lib/gitlab/import_export/relation_factory.rb | 2 |
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 500a1a49a80..65b229ca8ff 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -101,6 +101,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 |