FIX: Convert ID into integer before sorting

This commit is contained in:
Gerhard Schlager 2020-01-17 23:12:34 +01:00
parent 7933a29fa0
commit c3959f903a
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ module DiscourseAssign
.includes(:tags)
.includes(:user)
.joins("JOIN topic_custom_fields tcf ON topics.id = tcf.topic_id AND tcf.name = 'assigned_to_id' AND tcf.value IS NOT NULL")
.order('tcf.value, topics.bumped_at desc')
.order('tcf.value::integer, topics.bumped_at desc')
.offset(offset)
.limit(limit)