Commit 7f65339fffaf6d051338ee399bfe439234ce70a0
1 parent
777456b2
Exists in
master
and in
4 other branches
Fix s500 when press ervice test button
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/services/git_push_service.rb
@@ -59,8 +59,8 @@ class GitPushService | @@ -59,8 +59,8 @@ class GitPushService | ||
59 | # | 59 | # |
60 | def sample_data(project, user) | 60 | def sample_data(project, user) |
61 | @project, @user = project, user | 61 | @project, @user = project, user |
62 | - commits = project.repository.commits(project.default_branch, nil, 3) | ||
63 | - post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}") | 62 | + @push_commits = project.repository.commits(project.default_branch, nil, 3) |
63 | + post_receive_data(@push_commits.last.id, @push_commits.first.id, "refs/heads/#{project.default_branch}") | ||
64 | end | 64 | end |
65 | 65 | ||
66 | protected | 66 | protected |