-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Remove prefetched tags in FindingViewSet #13568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mtesauro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
| context={"request": request}, | ||
| ) | ||
| if finding_close.is_valid(): | ||
| # Remove the prefetched tags to avoid issues with delegating to celery |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :-)
There was a problem hiding this comment.
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.
| context={"request": request}, | ||
| ) | ||
| if finding_close.is_valid(): | ||
| # Remove the prefetched tags to avoid issues with delegating to celery |
There was a problem hiding this comment.
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.
|
Yeah, I agree that it would be ideal to only pass the ID and get the object from the DB in the task. The unfortunate part of the task is that it can accept a product, engagement, test, finding, or note, so it would take quite a restructure to accommodate that model |
Eliminate prefetched tags to prevent issues with celery delegation during finding closure operations.
[sc-11996]