-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fixed cache clearing for bulk-accepted suggestions. #2233
Merged
caiosba
merged 1 commit into
develop
from
fix/CV2-6191-clear-cache-on-bulk-accepting-suggestion
Feb 24, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
@caiosba: before we were passing the relationship ids instead of the target project medias id, but we want to
delete_cached_field
for source and target project medias, correct?Could we go through this file in our 1:1? I have other questions, like: why did you change the
delete_cached_field
method, and sort of related, why on like 31 we passpm_source.id
instead ofsource_id
.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.
Let's go through it in our 1:1, but I'm going to answer here for documentation as well.
There was a bug: We wanted to clear the cache for all project media IDs (source and targets, a.k.a. parent and children), but by mistake, the relationship IDs were being passed.
There is no difference between
source_id
andpm.source_id
, it was only Sawy's preference :)I took the opportunity to simplify, improve and refactor some things:
media_cluster_origin
field, that was added after this implementation