From 4783e85e2cac8ae3af95238af9f0f9af2bd3a4e4 Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Sat, 25 Jun 2011 19:27:49 +0400 Subject: [PATCH] Import fix if empty release group 2 --- app/controllers/import_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/import_controller.rb b/app/controllers/import_controller.rb index c94ecd1..f723f55 100644 --- a/app/controllers/import_controller.rb +++ b/app/controllers/import_controller.rb @@ -44,7 +44,7 @@ class ImportController < ApplicationController # Get album releases from MB releases_mb = brainz.release(nil, {'release-group' => mb_album['id']})['release_list']['release'] - unless releases_mb.empty? or releases_mb.nil? + unless releases_mb.nil? if releases_mb.is_a? Hash releases_mb = [releases_mb]