From c43b68005af25a527ee79c79b3ddb04f3aa35e0a Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sat, 14 Jun 2025 16:16:53 -0500 Subject: [PATCH] catch mystery missing profile comment and skip --- views/_news_profile_comment.erb | 42 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-) 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 %> -
-
+
+
-
- <% if current_site && current_site.id == actioning_site.id %> - You - <% else %> - <% if actioning_site.supporter? %><% end %><%= actioning_site.username %> - <% end %> +
+ <% if current_site && current_site.id == actioning_site.id %> + You + <% else %> + <% if actioning_site.supporter? %><% end %><%= actioning_site.username %> + <% end %> - <% if actioning_site.id != profile_comment.site_id %> - - <% if profile_comment.site.supporter? %><% end %><%= profile_comment.site.username %> - <% end %> + <% if actioning_site.id != profile_comment.site_id %> + + <% if profile_comment.site.supporter? %><% end %><%= profile_comment.site.username %> + <% end %> +
+ + + <%= profile_comment.created_at.ago %> +
- - - <%= profile_comment.created_at.ago %> - -
-
<%== sanitize_comment profile_comment.message %>
+
<%== sanitize_comment profile_comment.message %>
+<% end %> \ No newline at end of file