FIX: Force ordering to make things more consistent and fix flaky test (#22228)
This commit is contained in:
parent
47ab7eb49a
commit
50bded7b47
|
@ -10,7 +10,7 @@ class SidebarSectionsController < ApplicationController
|
||||||
.strict_loading
|
.strict_loading
|
||||||
.includes(:sidebar_urls)
|
.includes(:sidebar_urls)
|
||||||
.where("public OR user_id = ?", current_user.id)
|
.where("public OR user_id = ?", current_user.id)
|
||||||
.order("(public IS TRUE) DESC")
|
.order("(public IS TRUE) DESC, title ASC")
|
||||||
.map { |section| SidebarSectionSerializer.new(section, root: false) }
|
.map { |section| SidebarSectionSerializer.new(section, root: false) }
|
||||||
|
|
||||||
render json: sections
|
render json: sections
|
||||||
|
|
Loading…
Reference in New Issue