lib/mongoid/persistable.rb in mongoid-7.0.0 vs lib/mongoid/persistable.rb in mongoid-7.0.1
- old
+ new
@@ -201,10 +201,10 @@
#
# @since 4.0.0
def persist_atomic_operations(operations)
if persisted? && operations && !operations.empty?
selector = atomic_selector
- _root.collection.find(selector).update_one(positionally(selector, operations), session: session)
+ _root.collection.find(selector).update_one(positionally(selector, operations), session: _session)
end
end
end
end