Handle address is invalid while rendering event preview

Closes #996

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-04-01 13:54:16 +02:00
parent a99d66b68f
commit 2bdce8b2fc
7 changed files with 27 additions and 8 deletions

View File

@@ -125,7 +125,7 @@ th {
<dt><%= gettext("Ends on") %></dt>
<dd><%= datetime_to_string(@event.ends_on, @locale, :long) %></dd>
<% end %>
<%= if @event.physical_address do %>
<%= if not is_nil(@event.physical_address) and not is_nil(render_address(@event.physical_address)) do %>
<dt><%= gettext("Location") %></dt>
<dd><%= render_address(@event.physical_address) %></dd>
<% end %>