Skip to content

Commit

Permalink
Clean up ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Feb 28, 2024
1 parent 65d2da2 commit aa01be6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/polar_web/live/root_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ defmodule PolarWeb.RootLive do
join: p in assoc(v, :product),
where: v.current_state == ^"active" and p.os == ^os,
preload: [{:product, p}],
order_by: [asc: [p.os]],
order_by: [desc: [p.release]]
order_by: [asc: p.os],
order_by: [desc: p.release],
order_by: [desc: v.inserted_at]
)
|> Repo.all()

Expand All @@ -191,8 +192,9 @@ defmodule PolarWeb.RootLive do
where: v.current_state == ^"active",
join: p in assoc(v, :product),
preload: [{:product, p}],
order_by: [asc: [p.os]],
order_by: [desc: [p.release]]
order_by: [asc: p.os],
order_by: [desc: p.release],
order_by: [desc: v.inserted_at]
)
|> Repo.all()

Expand Down

0 comments on commit aa01be6

Please sign in to comment.