Skip to content

Remove unused problem list view#107

Merged
XanderVertegaal merged 2 commits into
developfrom
feature/remove-unused-list-view
May 19, 2026
Merged

Remove unused problem list view#107
XanderVertegaal merged 2 commits into
developfrom
feature/remove-unused-list-view

Conversation

@XanderVertegaal
Copy link
Copy Markdown
Contributor

This removes the unused list() method from ProblemView, probably from an earlier stage of development where we considered having a list. Everything seems to work perfectly without it.

We even had a few tests for a 'list' view in TestProblemViewPermissions. These keep working even after removing .list(), since ModelViewSet provides a default list method that simply returns the whole queryset. That is going to be a problem (see what I did there?) with the new 'hidden' feature on problems (#106).

To simplify things, I propose overriding the default list method and returning 404 NOT FOUND. The tests for the list view can then also go.

qs = self.get_queryset()

if filters is not None:
qs = qs.filter(filters)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could also just filter qs by hidden=False if the current user lacks appropriate permissions (after merging #106). I don't have a strong opinion on the matter though. We can always revert this later if we feel we need a list endpoint.

@XanderVertegaal XanderVertegaal merged commit 7dffe0b into develop May 19, 2026
1 check passed
@XanderVertegaal XanderVertegaal deleted the feature/remove-unused-list-view branch May 19, 2026 08:37
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