Skip to content

Commit cd9c309

Browse files
catwellpicandocodigo
authored andcommitted
deal with nil document types in Multimodel
1 parent 756a4da commit cd9c309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-model/lib/elasticsearch/model/multimodel.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def index_name
8585
# @return [Array] the list of document types used for retrieving documents
8686
#
8787
def document_type
88-
models.map { |m| m.document_type }
88+
models.map { |m| m.document_type }.compact.presence
8989
end
9090

9191
# Get the client common for all models

0 commit comments

Comments
 (0)