-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use "price" in ecommerce data loader #4450
fix: use "price" in ecommerce data loader #4450
Conversation
Thanks for the pull request, @tecoholic! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
b6ed4f9
to
ed70947
Compare
The Django Oscar upgrade of ecommerce changed the item's price field from `price_excl_tax` to just `price` causing the EcommerceApi data loader to fail. This commit checks for the `price_excl_tax` key and falls back to the 'price' value. Ref: openedx-unsupported/ecommerce#4050
ed70947
to
c472007
Compare
@AfaqShuaib09 Thanks for the suggestion. I have applied it to the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey,
Don’t we need to update other places, like in this closed PR?
https://github.com/openedx/course-discovery/pull/4291/files
i.e;, in update_entitlement
and validate_stockrecord
methods?
@AfaqShuaib09 I raised the with the fix for just the one place where I encountered an error. If other functions also need to be updated, I can do that. But I am not sure what those functions do. So, anyone can confirm those functions need to be updated, I can recreate update the PR accordingly. |
Hi there! I do agree with Afaq since this field was previously added in the aforementioned closed PR. Also, I believe adding it in |
@AfaqShuaib09 @Ali-D-Akbar Hi, thanks for confirming. I have updated the references in the mentioned functions and the mock data as well. Can you kindly review? Note: All the CI checks for Python 3.8 seems to be failing due to a setuptools error. I want to highlight that course-discovery tutor template for redwood uses Python 3.12. So we can safely disregard the 3.8 failures. |
@Ali-D-Akbar Hi, can you kindly review this change and merge it? cc: @AfaqShuaib09 |
8ea38d5
into
openedx:open-release/redwood.master
@Ali-D-Akbar Thank you. |
* chore: bump upload-artifact GH task to v4 * fix: fallback to 'price' in ecommerce api loader The Django Oscar upgrade of ecommerce changed the item's price field from `price_excl_tax` to just `price` causing the EcommerceApi data loader to fail. This commit checks for the `price_excl_tax` key and falls back to the 'price' value. Ref: openedx-unsupported/ecommerce#4050 * refactor: apply review suggestion on fix * fix: update all references of `price_excl_tax` to price * fix: remove extra item added accidentally
Description
The Django Oscar upgrade of ecommerce changed the
item's price field from
price_excl_tax
to justprice
causing the EcommerceApi data loader to fail.
This commit handled the exception and falls back to
the 'price' value.
Ref: openedx-unsupported/ecommerce#4050
Additional information
The same as #4291.
Testing instructions
Reproduce Issue
ecommerce
anddiscovery
enabled./manage.py refresh_course_metadata --partner dev
. It should fail with the KeyErrorprice_excl_tax
.Testing the fix from PR
./manage.py refresh_course_metadata --partner dev
again. This time, it should run successfully.