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

feat: Make it valid for ORGS, LABELS, and PEOPLE to be empty #28

Merged
merged 1 commit into from
May 31, 2023

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented May 30, 2023

This was prompted because we actually want LABELS to be empty as an intermediate step towards removing label creation from openedx-webhooks.

Per the docs on https://pypi.org/project/schema/ (scroll down to "Dictionaries"), schema validation will fail on empty dictionaries unless you specifically make the schema Or(<dict>, {}).

The only changes in this PR are wrapping each dict schema in Or(..., {}). I tested locally that this fixes https://github.com/openedx/openedx-webhooks-data/pull/191

Part of openedx/openedx-webhooks#218

@kdmccormick kdmccormick merged commit 56a51f7 into openedx:master May 31, 2023
@kdmccormick kdmccormick deleted the kdmccormick/empty-valid branch May 31, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants