Add guard to CRM subscription_plan function

This commit is contained in:
Uku Taht 2022-08-17 14:35:25 +03:00
parent 7bfd7cc219
commit f4db53109c

View File

@ -57,7 +57,8 @@ defmodule Plausible.Auth.UserAdmin do
end
defp subscription_plan(user) do
if user.subscription && user.subscription.status == "active" do
if user.subscription && user.subscription.status == "active" &&
user.subscription.paddle_subscription_id do
quota = PlausibleWeb.AuthView.subscription_quota(user.subscription)
interval = PlausibleWeb.AuthView.subscription_interval(user.subscription)