Add fallback for last service date and introduce 'unknown' label

This commit is contained in:
2026-08-08 14:30:11 -04:00
parent bdfad0d020
commit 7158a8b02c
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@
<% mileage = last.custom_values.find_by(custom_field_id: CustomField.find_by_name("Mileage").id) %>
<% if mileage %>
<p>
<b><%=t(:label_last_service) %></b> <%= last.closed_on.to_date %>
<b><%=t(:label_last_service) %></b> <%= last&.closed_on&.to_date || l(:label_unknown) %>
at <%= mileage.value %>
<%=t(:label_miles) %>
</p>