forked from External/greenlight
Fixed 500 when there is an invalid profile picture (#2109)
This commit is contained in:
parent
f992f76ae1
commit
74ebb15dad
|
@ -20,7 +20,7 @@
|
||||||
<div class="card card-profile h-100">
|
<div class="card card-profile h-100">
|
||||||
<div class="card-header bg-primary h-50"></div>
|
<div class="card-header bg-primary h-50"></div>
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<% if current_user.image.blank? %>
|
<% if current_user.image.blank? || !valid_url?(current_user.image) %>
|
||||||
<span class="avatar avatar-xxxl card-profile-img bg-primary"><%= current_user.name.first %></span>
|
<span class="avatar avatar-xxxl card-profile-img bg-primary"><%= current_user.name.first %></span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_tag(current_user.image, class: "avatar avatar-xxxl card-profile-img") %>
|
<%= image_tag(current_user.image, class: "avatar avatar-xxxl card-profile-img") %>
|
||||||
|
|
Loading…
Reference in New Issue