check for no recordings

This commit is contained in:
Joshua Arts 2018-07-27 14:18:39 -04:00
parent 7b15b84daa
commit 572134f344
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ class Room < ApplicationRecord
# Deletes all recordings associated with the room.
def delete_all_recordings
record_ids = recordings.map { |r| r[:recordID] }
delete_recording(record_ids)
delete_recording(record_ids) unless record_ids.empty?
end
# Generates a three character uid chunk.