[bbb-greenlight: 13/39] Fixed 500 when there is an invalid profile picture (#2109)
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bbb-greenlight: 13/39] Fixed 500 when there is an invalid profile picture (#2109)
- Date: Thu, 15 Oct 2020 07:11:22 +0000 (UTC)
commit 74ebb15dad102bfbaf863301c675ae5478976833
Author: Ahmad Farhat <ahmad af farhat gmail com>
Date: Mon Sep 21 13:12:17 2020 -0400
Fixed 500 when there is an invalid profile picture (#2109)
app/views/rooms/cant_create_rooms.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app/views/rooms/cant_create_rooms.html.erb b/app/views/rooms/cant_create_rooms.html.erb
index 1979731..cb661fa 100644
--- a/app/views/rooms/cant_create_rooms.html.erb
+++ b/app/views/rooms/cant_create_rooms.html.erb
@@ -20,7 +20,7 @@
<div class="card card-profile h-100">
<div class="card-header bg-primary h-50"></div>
<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>
<% else %>
<%= image_tag(current_user.image, class: "avatar avatar-xxxl
card-profile-img") %>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]