Skip to content

Commit d1bd19d

Browse files
committed
conditionally display matches
1 parent bbfe7f6 commit d1bd19d

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

lib/algora/settings/settings.ex

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,20 @@ defmodule Algora.Settings do
7070
end
7171

7272
def get_org_matches(org) do
73-
case get("org_matches:#{org.handle}") do
74-
%{"matches" => matches} when is_list(matches) ->
75-
load_matches(matches)
76-
77-
_ ->
78-
if tech_stack = List.first(org.tech_stack) do
79-
get_tech_matches(tech_stack)
80-
else
81-
[]
82-
end
73+
if get_user_profile(org.handle) do
74+
[]
75+
else
76+
case get("org_matches:#{org.handle}") do
77+
%{"matches" => matches} when is_list(matches) ->
78+
load_matches(matches)
79+
80+
_ ->
81+
if tech_stack = List.first(org.tech_stack) do
82+
get_tech_matches(tech_stack)
83+
else
84+
[]
85+
end
86+
end
8387
end
8488
end
8589

0 commit comments

Comments
 (0)