Fix join condition

pull/968/head
Uku Taht 6 years ago
parent 8d1039b8ce
commit eed7990289

@ -12,9 +12,10 @@ defmodule Plausible.Workers.NotifyAnnualRenewal do
users =
Repo.all(
from u in Plausible.Auth.User,
left_join: sent in "sent_renewal_notifications",
join: s in Plausible.Billing.Subscription,
on: s.user_id == u.id,
left_join: sent in "sent_renewal_notifications",
on: s.user_id == sent.user_id,
where: s.paddle_plan_id in @yearly_plans,
where:
s.next_bill_date > fragment("now()::date") and

Loading…
Cancel
Save