Skip to content

Commit

Permalink
chore(datastore): Fix new rubocop warning (#27535)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Oct 30, 2024
1 parent 87c5633 commit b9c5494
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions google-cloud-datastore/lib/google/cloud/datastore/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,10 @@ def where name_or_filter, operator = nil, value = nil
op: :AND
)
)
if name_or_filter.is_a? Google::Cloud::Datastore::Filter
@grpc.filter.composite_filter.filters << name_or_filter.to_grpc
else
@grpc.filter.composite_filter.filters << \
Google::Cloud::Datastore::Filter.new(name_or_filter, operator, value).to_grpc
unless name_or_filter.is_a? Google::Cloud::Datastore::Filter
name_or_filter = Google::Cloud::Datastore::Filter.new name_or_filter, operator, value
end
@grpc.filter.composite_filter.filters << name_or_filter.to_grpc

self
end
Expand Down

0 comments on commit b9c5494

Please sign in to comment.