summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-05 16:19:05 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-05 16:19:05 +0300
commit362d82d10e217231cd607e932a64b3e9b48f67c8 (patch)
tree594796459c62df79527bab735d61d2af258e8d94 /db/fixtures
parent38d23c0e5f816937047c9326f9dd33fb10490032 (diff)
downloadgitlab-ce-362d82d10e217231cd607e932a64b3e9b48f67c8.tar.gz
Prevent same branch in MR seeds
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/10_merge_requests.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/fixtures/development/10_merge_requests.rb b/db/fixtures/development/10_merge_requests.rb
index 4d0ec1e6da1..d122d96235e 100644
--- a/db/fixtures/development/10_merge_requests.rb
+++ b/db/fixtures/development/10_merge_requests.rb
@@ -14,6 +14,8 @@ Gitlab::Seeder.quiet do
branches = project.repository.branch_names.sample(2)
+ next if branches.uniq.size < 2
+
user_id = user.id
MergeRequestObserver.current_user = user
MergeRequest.seed(:id, [{