Skip to content
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

[FC-0036] fix: allows taxonomy list to "filter by org" even if org does not exist #33686

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

pomegranited
Copy link
Contributor

If the user requests the taxonomies linked to a non-existent org, then we want to see the non-org taxonomies.

Description

Allows the "taxonomy list" endpoint to filter by org even if the requested org is not found in the Organizations list.
Previously, attempting to filter taxonomies by a non-existent org would throw an error (400 Bad Request).
With this change, filtering by an non-existent org will return only the (global) instance-level taxonomies.

This case comes up in devstack (the edX Organization for the DemoX is not automatically created), and may also affect other small deployments which don't use Organizations.

Supporting information

Came across this while testing PRs for openedx/modular-learning#118

Testing instructions

  1. If you don't already have sample taxonomy/tags data, follow the instructions in this repo to generate sample data: https://github.com/open-craft/taxonomy-sample-data

  2. Visit the "taxonomy list" endpoint, with no filters: http://localhost:18010/api/content_tagging/v1/taxonomies/

    All taxonomies should be returned.

  3. Visit the "taxonomy list" endpoint and filter by a non-existent org, e.g. http://localhost:18010/api/content_tagging/v1/taxonomies/?org=edX

    Only those taxonomies with all_orgs=True should be listed.

Deadline

None

Other information

Private-ref: FAL-3523

If the user requests the taxonomies linked to a non-existent org, then
we want to see the non-org taxonomies.
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 9, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @pomegranited! 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@open-craft-grove
Copy link

Sandbox deploy request received. Deployment will start soon.

@open-craft-grove
Copy link

Sandbox deployment started.

@open-craft-grove
Copy link

Sandbox deployment failed.

Check failure logs here https://grove-stage-build-logs.nyc3.digitaloceanspaces.com/34602668-5494062867.log

Please check the settings and requirements and retry deployment by updating the pull request or posting a /grove sandbox update comment.

Copy link
Member

@yusuf-musleh yusuf-musleh left a comment

Choose a reason for hiding this comment

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

@pomegranited Thanks for the fix! It looks great to me! 👍

  • I tested this: (followed the testing instructions)
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@bradenmacdonald bradenmacdonald added the FC Relates to an Axim Funded Contribution project label Nov 9, 2023
@bradenmacdonald bradenmacdonald merged commit dad31a3 into openedx:master Nov 9, 2023
63 checks passed
@bradenmacdonald bradenmacdonald deleted the jill/allow-invalid-orgs branch November 9, 2023 19:23
@openedx-webhooks
Copy link

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

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants