lib/rocket_job/sliced/slices.rb in rocketjob-6.1.1 vs lib/rocket_job/sliced/slices.rb in rocketjob-6.2.0
- old
+ new
@@ -90,10 +90,10 @@
slice
end
def insert_many(slices)
documents = slices.collect(&:as_document)
- all.collection.insert_many(documents)
+ all.collection.insert_many(documents) if documents.present?
end
# Append to an existing slice if already present
def append(slice, input_slice)
existing_slice = all.where(id: input_slice.id).first