Skip to content

Commit

Permalink
Merge pull request #15325 from mansam/fix-inventory-db-relation
Browse files Browse the repository at this point in the history
Return an empty relation instead of an array from db_relation()
  • Loading branch information
agrare authored Jun 7, 2017
2 parents b19f1c4 + 03f6941 commit 2653cb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/manager_refresh/inventory_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def db_relation(selection = nil, projection = nil)
rel
end

relation || []
relation || model_class.none
end

# Extracting references to a relation friendly format, or a format processable by a custom_db_finder
Expand Down

0 comments on commit 2653cb2

Please sign in to comment.