Skip to content

Commit 340df5f

Browse files
committed
fix: pattern can never match
1 parent 2079dbe commit 340df5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/algora/matches/matches.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ defmodule Algora.Matches do
7777
}
7878
end)
7979

80-
Repo.transaction(fn ->
80+
Repo.transact(fn ->
8181
# Delete existing matches for this job posting
8282
Repo.delete_all(from(m in JobMatch, where: m.job_posting_id == ^job_posting_id))
8383

8484
# Insert new matches
8585
case Repo.insert_all(JobMatch, matches, on_conflict: :nothing) do
86-
{count, _} -> count
87-
error -> Repo.rollback(error)
86+
{0, _} -> {:error, "No matches created"}
87+
{count, _} -> {:ok, count}
8888
end
8989
end)
9090
end

0 commit comments

Comments
 (0)