diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-14 20:54:59 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-06-14 21:01:15 +0300 |
commit | 338d9b257ecfa6f088daaeb9d93ea8991f8965d0 (patch) | |
tree | 5d46c40b24dbb0626d5b672de34d555dec073b71 /lib/banzai/reference_parser | |
parent | 5771b946c2e68fd4b9a8ff040c168b568b68a586 (diff) |
Don't return nil for missing objects from parser cache
Diffstat (limited to 'lib/banzai/reference_parser')
-rw-r--r-- | lib/banzai/reference_parser/base_parser.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/reference_parser/base_parser.rb b/lib/banzai/reference_parser/base_parser.rb index 1e2536231d8..279fca8d043 100644 --- a/lib/banzai/reference_parser/base_parser.rb +++ b/lib/banzai/reference_parser/base_parser.rb @@ -171,7 +171,7 @@ module Banzai collection.where(id: to_query).each { |row| cache[row.id] = row } end - cache.values_at(*ids) + cache.values_at(*ids).compact else collection.where(id: ids) end |