FIX: Force ordering to make things more consistent and fix flaky test (#22228)

This commit is contained in:
Daniel Waterworth 2023-06-21 13:16:10 -05:00 committed by GitHub
parent 47ab7eb49a
commit 50bded7b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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