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: filter files by category #659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

czosel
Copy link
Contributor

@czosel czosel commented Sep 30, 2024

No description provided.

@czosel czosel requested a review from winged September 30, 2024 16:04
Copy link
Contributor

@winged winged left a comment

Choose a reason for hiding this comment

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

Just a few minor issues, LGTM otherwise

Comment on lines +171 to +172
category = CategoriesFilter(field_name="document__category")
categories = CategoriesFilter(field_name="document__category")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need both? They're functionally equal. I'd rather only have the plural if possible. (I notice the DocumentFilterSet also has both though, so maybe for consistency... 🤔 )

Comment on lines +394 to +397
response = admin_client.get(
reverse("file-list"),
{"filter[categories]": f1.document.category_id, "filter[variant]": "original"},
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a test for category as well if we're adding it to the filterset

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