-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi! I'm having a small problem with the Ohm integration, specifically when using Ohm::Model#find. If the returned Set is empty, calling methods such as to_a or first on it will crash with an error:
releases = Release.find(commit_hash: "does_not_exist")
releases.first
# NoMethodError: undefined method `each' for nil:NilClass
# from /Users/brunoabrantes/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/redic-pool-1.0.1/lib/redic/pool.rb:30:in `block in commit'I've tested this with a normal Redis connection (so no Connection Pooling) and it works as expected, returning nil. to_a will also return an empty array as expected.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels