Skip to content

Commit

Permalink
Convert Active Record Relation to Array in Products Controller (#651)
Browse files Browse the repository at this point in the history
Co-authored-by: sentry-autofix[bot] <157164994+sentry-autofix[bot]@users.noreply.github.com>
Co-authored-by: Kosty Maleyev <[email protected]>
  • Loading branch information
sentry-autofix[bot] and realkosty authored Jan 3, 2025
1 parent c1cd06d commit b9e86af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def index
span_products_slow_db = transaction.start_child(op: "custom.reviews_slow_db_call")
prod_slow["pg_sleep"] = ""
prod_slow["reviews"] = []
prod_slow["reviews"] = Reviews.select("id, productid, rating, customerid, description, created, Null as pg_sleep").where("productid="+prod_slow.id.to_s)
prod_slow["reviews"] = Reviews.select("id, productid, rating, customerid, description, created, Null as pg_sleep").where("productid="+prod_slow.id.to_s).to_a
span_products_slow_db.finish
end

Expand Down

0 comments on commit b9e86af

Please sign in to comment.