Skip to content

Default ordering to FindingGroup#13081

Closed
LeoOMaia wants to merge 1 commit into
DefectDojo:devfrom
LeoOMaia:default-order
Closed

Default ordering to FindingGroup#13081
LeoOMaia wants to merge 1 commit into
DefectDojo:devfrom
LeoOMaia:default-order

Conversation

@LeoOMaia

Copy link
Copy Markdown
Contributor

As discussed in #13001

@dryrunsecurity

Copy link
Copy Markdown

DryRun Security

🔴 Risk threshold exceeded.

This pull request contains a sensitive edit to the file "dojo/finding_group/views.py" which requires careful review, though it is not automatically blocking and can be configured in the .dryrunsecurity.yaml file.

🔴 Configured Codepaths Edit in dojo/finding_group/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.

We've notified @mtesauro.


All finding details can be found in the DryRun Security Dashboard.

@valentijnscholten

Copy link
Copy Markdown
Member

What does this PR do? I think it fixes the ordering of findings in finding groups if a non-default ordering is selected?

@valentijnscholten valentijnscholten added this to the 2.51.0 milestone Sep 1, 2025
@LeoOMaia

LeoOMaia commented Sep 6, 2025

Copy link
Copy Markdown
Contributor Author

The warning error that was being generated in the GroupFindings view basically occurs because I didn’t define a default ordering for the view when no specific ordering is selected. I’m just setting a default to avoid the warning.

@valentijnscholten

Copy link
Copy Markdown
Member

Is it similar to #13119 or are both PRs needed?

@LeoOMaia

LeoOMaia commented Sep 6, 2025

Copy link
Copy Markdown
Contributor Author

I reviewed it and the idea seems similar to setting a default ordering, but the way the person is doing it looks wrong. If someone selects to order by a field, for example name, in the end the paginate_queryset will overwrite it by ordering with id i think.

@valentijnscholten

Copy link
Copy Markdown
Member

Can you rebase your PR and remove their change so we can merge your fix?

@LeoOMaia

LeoOMaia commented Sep 6, 2025

Copy link
Copy Markdown
Contributor Author

I created a new PR to the bug branch. This current PR is targeting dev, so we can close this branch, is that okay?

@valentijnscholten

Copy link
Copy Markdown
Member

Yes

@LeoOMaia LeoOMaia closed this Sep 6, 2025
@LeoOMaia LeoOMaia deleted the default-order branch September 6, 2025 20:15
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