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

add 'public' to TaxonomyTopic, filter to public for API and serializer #1991

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

goose-life
Copy link
Contributor

The additional test fixtures are to check that the test still passes (it only sees the public root).

I suspect Work.public_taxonomy_topics() can be finessed a bit, but it works as is.

@classmethod
def get_public_root_nodes(cls):
root_nodes = cls.get_root_nodes()
return root_nodes.exclude(public=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: double negatives lead to confusion, prefer .filter(public=True).

longhotsummer
longhotsummer previously approved these changes Feb 21, 2024
@goose-life goose-life merged commit 6f09d2c into master Feb 21, 2024
6 checks passed
@goose-life goose-life deleted the taxonomy-topics-public branch February 21, 2024 10:43
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