Add deterministic tiebreaker to contacts sort order
This commit is contained in:
parent
d1b1b4cc7e
commit
7fd8f3165c
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ defmodule Microwaveprop.Radio do
|
|||
|
||||
entries =
|
||||
base_query
|
||||
|> order_by([q], [{^sort_dir, field(q, ^sort_field)}])
|
||||
|> order_by([q], [{^sort_dir, field(q, ^sort_field)}, {^sort_dir, q.id}])
|
||||
|> limit(^@per_page)
|
||||
|> offset(^offset)
|
||||
|> Repo.all()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue