BigW Consortium Gitlab

Commit c809ef11 by Yorick Peterse Committed by DJ Mountney

Merge branch 'forked-subquery-order' into 'master'

Remove unnecessary ORDER BY clause from `forked_to_project_id` subquery See merge request !10334
parent 36cfb0a7
......@@ -631,8 +631,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
......
---
title: Remove unnecessary ORDER BY clause from `forked_to_project_id` subquery
merge_request:
author: mhasbini
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment