You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The PriceRange also includes the prices of the soft deleted product variants when using the search query.
To Reproduce
Steps to reproduce the behavior:
Add a new product with just the default variant and set the price to "10"
Use "Manage variants" to add a new option and fill up with two option values (creates two variants) and set both their prices to "20" and save (confirm the "Delete default variant" dialog) -> the variant with the price "10" will be soft deleted
Execute a search query to the the prices of the product.
query (...) {
search(...) {
items {
price {
... on SinglePrice {
value
}
... on PriceRange {
min
max
}
}
}
}
}
Outputs:
...
"price": {
"min": 1000,
"max": 2000
}
...
Expected behavior
The prices of soft deleted product variants should be ignored/excluded. The output should be:
...
"price": {
"min": 2000,
"max": 2000
}
...
Environment (please complete the following information):
@vendure/core version: 0.8.0
elasticsearch plugin installed
Nodejs version: 12.4.1
Database: mysql
The text was updated successfully, but these errors were encountered:
oncode
changed the title
PriceRange includes prices of soft deleted product variants.
PriceRange includes prices of soft deleted product variants
Feb 19, 2020
Describe the bug
The PriceRange also includes the prices of the soft deleted product variants when using the search query.
To Reproduce
Steps to reproduce the behavior:
Outputs:
Expected behavior
The prices of soft deleted product variants should be ignored/excluded. The output should be:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: