Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dojo/api_v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,8 @@ def close(self, request, pk=None):
context={"request": request},
)
if finding_close.is_valid():
# Remove the prefetched tags to avoid issues with delegating to celery
Copy link
Member

Choose a reason for hiding this comment

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

what kind of issues and where?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the description with the stack trace

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. Almost like we would be better of by just having a couple of M2M fields named tags and some helper methods :-)

Copy link
Member

Choose a reason for hiding this comment

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

ultimately I think it might be better to only send the finding.id to a celery task and let it fetch the latest and greatest data from the db. but for now I understand this move.

finding.tags._remove_prefetched_objects()
# Use shared helper to perform close operations
finding_helper.close_finding(
finding=finding,
Expand Down