We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2079dbe commit 340df5fCopy full SHA for 340df5f
lib/algora/matches/matches.ex
@@ -77,14 +77,14 @@ defmodule Algora.Matches do
77
}
78
end)
79
80
- Repo.transaction(fn ->
+ Repo.transact(fn ->
81
# Delete existing matches for this job posting
82
Repo.delete_all(from(m in JobMatch, where: m.job_posting_id == ^job_posting_id))
83
84
# Insert new matches
85
case Repo.insert_all(JobMatch, matches, on_conflict: :nothing) do
86
- {count, _} -> count
87
- error -> Repo.rollback(error)
+ {0, _} -> {:error, "No matches created"}
+ {count, _} -> {:ok, count}
88
end
89
90
0 commit comments