Skip to content

Conversation

@mbertrand
Copy link
Member

@mbertrand mbertrand commented Jul 8, 2024

What are the relevant tickets?

Description (What does it do?)

  • Adds the overwrite=True kwarg to the offeror_upserted_actions call within the upsert_offered_by_data function.
  • Updates the upsert_offered_by_data function to use code instead of name as the primary key to use for upserts.

How can this be tested?

  • Run the following if you haven't already done so:
    ./manage.py upsert_offered_by
    ./manage.py backpopulate_resource_channels
    
  • Go to http://open.odl.local:8062/c/unit/mitx/ and verify that the title in the browser tab is the same as what's specified for MITx in the file learning_resources/fixtures/offered_by.json
  • Change the name for mitx in that json file to something else like "MITx Offeror"
  • Rerun ./manage.py update_offered_by
  • Reload the url above, the browser tab title should now display the new name.

@mbertrand mbertrand changed the title Use ovewrite=True when calling pluggy function from upsert_offered_by Use overwrite=True when calling pluggy function from upsert_offered_by Jul 8, 2024
@mbertrand mbertrand added Needs Review An open Pull Request that is ready for review and removed Work in Progress labels Jul 8, 2024
@shanbady shanbady self-requested a review July 9, 2024 13:20
@shanbady shanbady self-assigned this Jul 9, 2024
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here look good and works as needed. Going to approve but i have a suggestion that likely warrants its own ticket. Since we now have the data_fixtures app, we should move our static fixture loading into the common app since folks will likely end up running this command after the data fixtures app migrates and theres no easy way to tell which one is the source of truth

@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Jul 9, 2024
@mbertrand
Copy link
Member Author

Since we now have the data_fixtures app, we should move our static fixture loading into the common app since folks will likely end up running this command after the data fixtures app migrates and theres no easy way to tell which one is the source of truth

Do you plan to make an issue for that or should I?

@mbertrand mbertrand merged commit c93cc44 into main Jul 9, 2024
@odlbot odlbot mentioned this pull request Jul 10, 2024
27 tasks
@mbertrand mbertrand deleted the mb/mgmt_pluggy branch October 23, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants