From 50bded7b476a80c27a923f82cdf6ab3a4b886768 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Wed, 21 Jun 2023 13:16:10 -0500 Subject: [PATCH] FIX: Force ordering to make things more consistent and fix flaky test (#22228) --- app/controllers/sidebar_sections_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/sidebar_sections_controller.rb b/app/controllers/sidebar_sections_controller.rb index a61af92b7a8..0c9a919d18f 100644 --- a/app/controllers/sidebar_sections_controller.rb +++ b/app/controllers/sidebar_sections_controller.rb @@ -10,7 +10,7 @@ class SidebarSectionsController < ApplicationController .strict_loading .includes(:sidebar_urls) .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) } render json: sections