Skip to content

A platform for community discussion. Free, open, simple.

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

Daniel Waterworth50bded7b476a
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