From 82b09860f23b351cdcad75e93538887b1fde45f0 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 2 Jan 2019 15:55:24 -0600 Subject: [PATCH] Fix #4032: /tag_aliases page is broken. --- app/models/tag_relationship.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/tag_relationship.rb b/app/models/tag_relationship.rb index b714809a3..3bdefd263 100644 --- a/app/models/tag_relationship.rb +++ b/app/models/tag_relationship.rb @@ -87,7 +87,7 @@ class TagRelationship < ApplicationRecord def pending_first # unknown statuses return null and are sorted first - order(Arel.sql("array_position(array['queued', 'processing', 'pending', 'active', 'deleted', 'retired'], status) NULLS FIRST, antecedent_name, consequent_name")) + order(Arel.sql("array_position(array['queued', 'processing', 'pending', 'active', 'deleted', 'retired'], status::text) NULLS FIRST, antecedent_name, consequent_name")) end def default_order