Skip to content

Commit a9ec8ae

Browse files
committed
add nil check
1 parent db5fe88 commit a9ec8ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/algora_web/live/org/job_live.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,12 @@ defmodule AlgoraWeb.Org.JobLive do
10941094
# Fetch contributions for all applicants and create a map for quick lookup
10951095
defp fetch_applicants_contributions(users, tech_stack) do
10961096
Enum.reduce(users, %{}, fn user, acc ->
1097-
contributions = Algora.Workspace.list_user_contributions(user.provider_login, limit: 20, tech_stack: tech_stack)
1098-
Map.put(acc, user.id, contributions)
1097+
if user.provider_login do
1098+
contributions = Algora.Workspace.list_user_contributions(user.provider_login, limit: 20, tech_stack: tech_stack)
1099+
Map.put(acc, user.id, contributions)
1100+
else
1101+
acc
1102+
end
10991103
end)
11001104
end
11011105

0 commit comments

Comments
 (0)