Skip to content

Commit

Permalink
sorted by submission.id as well for the edge case that inserted_at is…
Browse files Browse the repository at this point in the history
… the same
  • Loading branch information
thortol committed Aug 19, 2024
1 parent 2f79ecc commit ec73e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cadet/assessments/assessments.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ defmodule Cadet.Assessments do
query =
sort_submission(query, Map.get(params, "sortBy", ""), Map.get(params, "sortDirection", ""))

query = from([s, ans, asst, cr, user, group] in query, order_by: [desc: s.inserted_at])
query = from([s, ans, asst, cr, user, group] in query, order_by: [desc: s.inserted_at, asc: s.id])
submissions = Repo.all(query)

count_query =
Expand Down

0 comments on commit ec73e5d

Please sign in to comment.