Repository navigation
Conversation
g-kedev
force-pushed
the
feat/edit-all-possible-without-editable-filter
branch
2 times, most recently
from
November 9, 2026 09:10
0048de0 to
2fa319c
Compare
g-kedev
force-pushed
the
feat/edit-all-possible-without-editable-filter
branch
3 times, most recently
from
November 10, 2026 08:54
3beaefe to
238a994
Compare
g-kedev
marked this pull request as ready for review
November 10, 2026 09:02
trowik
requested changes
Nov 11, 2026
| view = self.context["view"] | ||
| queryset = view.filter_queryset(view.get_queryset()) | ||
| filtered_queryset = ReportFilterSet.filter_editable( | ||
| view, queryset=queryset, _name="foobar", value=True |
Contributor
Author
There was a problem hiding this comment.
Filter editable requires a name parameter, but since it isn't even used I just pass some nonesense.
| super().get_root_meta(resource, many) | ||
| if hasattr(super(), "get_root_meta") | ||
| else {} | ||
| ) |
Member
There was a problem hiding this comment.
I would probably add the same if many: check as in TotalTimeRootMetaMixin
Contributor
Author
There was a problem hiding this comment.
Well currently you can use the edit all button even when you only have one report (the button doesn't get disabled). So if I add an if many check I would also have to add a check, that the button is disabled if less than two reports are selected. Would that be the desired behaviour?
| filtered_queryset = ReportFilterSet.filter_editable( | ||
| view, queryset=queryset, _name="foobar", value=True | ||
| ) | ||
| meta["can_edit_all"] = queryset.count() == filtered_queryset.count() |
Member
There was a problem hiding this comment.
refactor to use exists() instead of counting both queries
g-kedev
force-pushed
the
feat/edit-all-possible-without-editable-filter
branch
from
November 13, 2026 15:11
238a994 to
0d9b95a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: #1601