openedx / openedx-learning

GNU Affero General Public License v3.0
5 stars 8 forks source link

fix: add `lookup_value_regex` for taxonomy rest api #101

Closed rpenido closed 10 months ago

rpenido commented 10 months ago

Description

Configure the lookup_value_regex in the TaxonomyView. Currently, accessing the API using an invalid pk (i.e. using a str) throws an exception when the value is converted to int, returning status 500, instead of a 404.

Testing instructions

  1. Please ensure that the tests cover the expected behavior of the view
  2. Using this branch, run the dev server: python manage.py runserver
  3. Create a superuser using python manage.py createsuperuser
  4. Login in admin and authenticate with the user created (http://127.0.0.1:8000/admin)
  5. In the same browser session, check the result in the API Viewer:
openedx-webhooks commented 10 months ago

Thanks for the pull request, @rpenido! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

rpenido commented 10 months ago

Thank you @ChrisChV!

@bradenmacdonald, could you do a CC review here?

openedx-webhooks commented 10 months ago

@rpenido 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.