Skip to content

Commit

Permalink
recent_occurrence can be string or date time
Browse files Browse the repository at this point in the history
  • Loading branch information
fractaledmind authored Apr 10, 2024
1 parent c9cb77c commit 515da37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/solid_errors/errors/_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= error.occurrences_count %>
</td>
<td scope="col" class="whitespace-nowrap px-3 py-4 pt-7 text-gray-500 text-right">
<% 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 %>
<abbr title="<%= last_seen_at.iso8601 %>" class="cursor-help">
<%= time_tag last_seen_at, time_ago_in_words(last_seen_at, scope: 'datetime.distance_in_words.short') %>
</abbr>
Expand Down

0 comments on commit 515da37

Please sign in to comment.