diff --git a/views/_news_profile_comment.erb b/views/_news_profile_comment.erb index 7e20bb7d..7cf43e89 100644 --- a/views/_news_profile_comment.erb +++ b/views/_news_profile_comment.erb @@ -1,24 +1,26 @@ -<% actioning_site = profile_comment.actioning_site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> -<% site = profile_comment.site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> +<% if profile_comment %> + <% actioning_site = profile_comment.actioning_site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> + <% site = profile_comment.site_dataset.select(:id, :username, :stripe_customer_id, :plan_type, :parent_site_id).first %> -