Change frontend to use resource_prices field instead of prices field #1737
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
PR 2 of 5 to address https://github.com/mitodl/hq/issues/5134 and https://github.com/mitodl/hq/issues/4685
Dependent on PR 1 here: #1736
Description (What does it do?)
Screenshots (if appropriate):
If price is in Euros (EUR):
If price is in Swiss francs (CHF, no symbol):
In dollars (USD):
How can this be tested?
http://open.odl.local:8062/search?platform=mitxonline&platform=xpro
, you will see a mix of courses that should all either be paid with certificate (xpro) or free with a paid certificate option (mitxonline). If you click on a course card you will see the same price in the drawer.docker compose build web celery
(new python package) and restart containers. Make sure the new migrations complete successfully.http://open.odl.local:8062/search?platform=mitxonline&platform=xpro
again. This time, you will see "Paid" instead of an actual price on the course cards because the index has not been updated. If you click on one you should see the actual price in the drawer, because that is coming straight from the database../manage.py update_index --courses --programs
, then wait a minute or 2.http://open.odl.local:8062/search?platform=mitxonline&platform=xpro
again. Now you should see the actual prices on the course cards../manage.py recreate_index --all
, it should complete without errors.SEE_*
andEDX_API_*
):vs
prices
field should be restored with values:Additional Context
LearningResource.prices
andLearningResourceRun.prices
fields to be the same asresource_prices
, and update schema. (Note: this will cause index updates to fail until a reindex completes)prices
field againresource_prices
from models and schemas.