fix(views): guard against nil entry.date in partials (#1878)

Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
This commit is contained in:
sentry[bot]
2026-05-22 02:33:28 +02:00
committed by GitHub
parent 548c4d1a3f
commit ced133d06e
4 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@
<div class="flex-1 text-sm">
<div class="font-medium text-primary"><%= entry.name %></div>
<div class="text-xs text-secondary">
<%= I18n.l(entry.date, format: :short) %> •
<%= entry.date ? I18n.l(entry.date, format: :short) : "—" %> •
<%= number_to_currency(entry.amount.abs, unit: Money::Currency.new(entry.currency).symbol) %>
</div>
</div>

View File

@@ -31,7 +31,7 @@
</div>
<span class="text-sm text-secondary">
<%= I18n.l(entry.date, format: :long) %>
<%= entry.date ? I18n.l(entry.date, format: :long) : "—" %>
</span>
<% end %>

View File

@@ -19,7 +19,7 @@
</h3>
<div class="flex items-center gap-2">
<span class="text-sm text-secondary">
<%= I18n.l(entry.date, format: :long) %>
<%= entry.date ? I18n.l(entry.date, format: :long) : "—" %>
</span>
<% if entry.transaction.pending? %>
<span class="inline-flex items-center gap-1 text-xs font-medium rounded-full px-1.5 py-0.5 border border-secondary text-secondary" title="<%= t("transactions.transaction.pending_tooltip") %>">

View File

@@ -19,6 +19,6 @@
</div>
<span class="text-sm text-secondary">
<%= I18n.l(entry.date, format: :long) %>
<%= entry.date ? I18n.l(entry.date, format: :long) : "—" %>
</span>
<% end %>