Skip to content

Commit

Permalink
deal with nil document types in Multimodel
Browse files Browse the repository at this point in the history
  • Loading branch information
catwell authored and picandocodigo committed Mar 1, 2021
1 parent 756a4da commit cd9c309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elasticsearch-model/lib/elasticsearch/model/multimodel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def index_name
# @return [Array] the list of document types used for retrieving documents
#
def document_type
models.map { |m| m.document_type }
models.map { |m| m.document_type }.compact.presence
end

# Get the client common for all models
Expand Down

0 comments on commit cd9c309

Please sign in to comment.