Skip to content

feat: allow bulk edit of verify and review#780

Open
StephanH90 wants to merge 1 commit intoadfinis:mainfrom
StephanH90:feat/allow-bulk-verified-by
Open

feat: allow bulk edit of verify and review#780
StephanH90 wants to merge 1 commit intoadfinis:mainfrom
StephanH90:feat/allow-bulk-verified-by

Conversation

@StephanH90
Copy link
Contributor

Currently it's not possible to bulk edit any reports that have the "needs review" flag set. This MR addresses this and shows you a warning (and then the backend throws an error) if you try to save an invalid combination of verify and review.

image

image

Currently it's not possible to bulk edit any reports that have the "needs review" flag set.
This MR addresses this and shows you a warning (and then the backend throws an error) if you
try to save an invalid combination of verify and review.
@StephanH90 StephanH90 requested review from a team as code owners July 8, 2025 06:50
@StephanH90 StephanH90 self-assigned this Jul 8, 2025
@StephanH90 StephanH90 added feature This issue or pull request discusses a feature javascript Pull requests that update Javascript code python Pull requests that update Python code labels Jul 8, 2025
@StephanH90
Copy link
Contributor Author

@trowik I need to take a look at the failing test. I had a quick look right now but I didn't understand why the data attribute that is set in the test is not received by the ReportViewSet.

Copy link
Member

@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.

Small perf suggestion


if fields.get("review") or any(queryset.values_list("review", flat=True)):
if (
any(queryset.values_list("review", flat=True))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
any(queryset.values_list("review", flat=True))
queryset.filter(review=True).exists()

if (
verified is None
and fields.get("review")
and any(queryset.values_list("verified_by", flat=True))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
and any(queryset.values_list("verified_by", flat=True))
and queryset.filter(verified_by__isnull=False).exists()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature This issue or pull request discusses a feature javascript Pull requests that update Javascript code python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants