Skip to content

Commit c8ad2af

Browse files
Merge pull request #45 from mepatterson/patch-3
Update objects.rb to pass tenant to batch_delete as param
2 parents 48439a7 + 73e3ccf commit c8ad2af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/weaviate/objects.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,13 @@ def batch_delete(
162162
where:,
163163
consistency_level: nil,
164164
output: nil,
165-
dry_run: nil
165+
dry_run: nil,
166+
tenant: nil
166167
)
167168
path = "batch/#{PATH}"
168169

169170
unless consistency_level.nil?
170171
validate_consistency_level!(consistency_level)
171-
172-
path << "?consistency_level=#{consistency_level.to_s.upcase}"
173172
end
174173

175174
response = client.connection.delete(path) do |req|
@@ -181,6 +180,8 @@ def batch_delete(
181180
}
182181
req.body["output"] = output unless output.nil?
183182
req.body["dryRun"] = dry_run unless dry_run.nil?
183+
req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
184+
req.params["tenant"] = tenant unless tenant.nil?
184185
end
185186

186187
response.body

0 commit comments

Comments
 (0)