diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-01 00:27:34 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-01 00:27:34 +0100 |
commit | 8d3ed6e49e1577e4198b7d5e60fd2e70cb3a446d (patch) | |
tree | 3d77ec54a8e97a75aee650a2ef4e464065af9c5d /app/models/user.rb | |
parent | d0260cb7f20ba23672d773e5fc011f9c2cf81aaa (diff) | |
parent | b54acba8b732688c59fe2f38510c469dc86ee499 (diff) | |
download | gitlab-ce-30264-fix-vue-pagination.tar.gz |
Merge branch 'master' into 30264-fix-vue-pagination30264-fix-vue-pagination
* master:
Prevent users from disconnecting gitlab account from CAS
30276 Move issue, mr, todos next to profile dropdown in top nav
Refactor SearchController#show
Updating documentation to include a missing step in the update procedure
Fix link to Jira service documentation
Remove unnecessary ORDER BY clause from `forked_to_project_id` subquery
Fixed a gap underneath the scrolling inner page links
Add download attribute to download links
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index cbd741f96ed..95a766f2ede 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -635,8 +635,10 @@ class User < ActiveRecord::Base end def fork_of(project) - links = ForkedProjectLink.where(forked_from_project_id: project, forked_to_project_id: personal_projects) - + links = ForkedProjectLink.where( + forked_from_project_id: project, + forked_to_project_id: personal_projects.unscope(:order) + ) if links.any? links.first.forked_to_project else |