From 6b7f9e0831f0fe39fc72efb9edb7e3741b82190d Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Tue, 23 Mar 2021 17:58:30 -0400 Subject: [PATCH] Fixed 500 if user has no rooms in Latest Recordings (#2600) --- app/controllers/concerns/populator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/populator.rb b/app/controllers/concerns/populator.rb index a8df30d6..dd86d314 100644 --- a/app/controllers/concerns/populator.rb +++ b/app/controllers/concerns/populator.rb @@ -61,7 +61,7 @@ module Populator if user.present? # Find user and get his recordings rooms = User.find_by(email: user)&.rooms&.pluck(:bbb_id) - return all_recordings(rooms) if user.present? + return all_recordings(rooms) if user.present? && !rooms.nil? [] # return no recs if room not found elsif room.present?