lib/flapjack/gateways/jsonapi/entity_methods.rb in flapjack-0.8.11 vs lib/flapjack/gateways/jsonapi/entity_methods.rb in flapjack-0.8.12

- old
+ new

@@ -42,14 +42,14 @@ end entities = if requested_entities Flapjack::Data::Entity.find_by_ids(requested_entities, :logger => logger, :redis => redis) else - Flapjack::Data::Entity.all(:redis => redis) + Flapjack::Data::Entity.all(:redis => redis).reject {|e| e.id.nil? || e.id.empty? } end entities.compact! - if requested_entities && requested_entities.empty? + if requested_entities && entities.empty? raise Flapjack::Gateways::JSONAPI::EntitiesNotFound.new(requested_entities) end linked_contact_ids = Flapjack::Data::Entity.contact_ids_for(entities.map(&:id), :redis => redis)