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 c4c58bd commit 18a6acbCopy full SHA for 18a6acb
lib/algora/settings/settings.ex
@@ -103,7 +103,21 @@ defmodule Algora.Settings do
103
[
104
tech_stack: job.tech_stack,
105
limit: 50,
106
- users: apply_job_criteria(User, get_job_criteria(job.id))
+ users:
107
+ case get_job_criteria(job.id) do
108
+ criteria when map_size(criteria) > 0 ->
109
+ apply_job_criteria(User, criteria)
110
+
111
+ _ ->
112
+ from(u in User,
113
+ where:
114
+ not is_nil(u.hourly_rate_min) or
115
+ fragment(
116
+ "exists (select 1 from transactions t where t.user_id = ? and t.status = 'succeeded' and t.type = 'credit' and t.linked_transaction_id is not null)",
117
+ u.id
118
+ )
119
120
+ end
121
]
122
|> Algora.Cloud.list_top_matches()
123
|> load_matches_2()
0 commit comments