Skip to content

Commit

Permalink
Merge pull request #45 from mepatterson/patch-3
Browse files Browse the repository at this point in the history
Update objects.rb to pass tenant to batch_delete as param
  • Loading branch information
andreibondarev authored Feb 3, 2024
2 parents 48439a7 + 73e3ccf commit c8ad2af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/weaviate/objects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,13 @@ def batch_delete(
where:,
consistency_level: nil,
output: nil,
dry_run: nil
dry_run: nil,
tenant: nil
)
path = "batch/#{PATH}"

unless consistency_level.nil?
validate_consistency_level!(consistency_level)

path << "?consistency_level=#{consistency_level.to_s.upcase}"
end

response = client.connection.delete(path) do |req|
Expand All @@ -181,6 +180,8 @@ def batch_delete(
}
req.body["output"] = output unless output.nil?
req.body["dryRun"] = dry_run unless dry_run.nil?
req.params["consistency_level"] = consistency_level.to_s.upcase unless consistency_level.nil?
req.params["tenant"] = tenant unless tenant.nil?
end

response.body
Expand Down

0 comments on commit c8ad2af

Please sign in to comment.