Fixed 500 if user has no rooms in Latest Recordings (#2600)

This commit is contained in:
Ahmad Farhat 2021-03-23 17:58:30 -04:00 committed by GitHub
parent 79beb7f3fa
commit 6b7f9e0831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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?