From 515da3798b15e90e6da7204bf2d03b468bd5491a Mon Sep 17 00:00:00 2001 From: Stephen Margheim Date: Wed, 10 Apr 2024 15:54:43 +0200 Subject: [PATCH] recent_occurrence can be string or date time --- app/views/solid_errors/errors/_row.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/solid_errors/errors/_row.html.erb b/app/views/solid_errors/errors/_row.html.erb index 8a981c5..b4eb56c 100644 --- a/app/views/solid_errors/errors/_row.html.erb +++ b/app/views/solid_errors/errors/_row.html.erb @@ -14,7 +14,7 @@ <%= error.occurrences_count %> - <% last_seen_at = DateTime.strptime(error.recent_occurrence, "%Y-%m-%d %H:%M:%S.%N") %> + <% last_seen_at = error.recent_occurrence.is_a?(String) ? DateTime.strptime(error.recent_occurrence, "%Y-%m-%d %H:%M:%S.%N") : error.recent_occurrence %> <%= time_tag last_seen_at, time_ago_in_words(last_seen_at, scope: 'datetime.distance_in_words.short') %>