[ENG-8743] subscribe_osf_general_email settings is not updated#11270
Merged
Johnetordoff merged 1 commit intoCenterForOpenScience:feature/pbs-25-16from Aug 28, 2025
Merged
Conversation
Johnetordoff
requested changes
Aug 28, 2025
Contributor
Johnetordoff
left a comment
There was a problem hiding this comment.
Good to go, one minor change requested
Johnetordoff
approved these changes
Aug 28, 2025
Contributor
Johnetordoff
left a comment
There was a problem hiding this comment.
I changed my mind, approved.
2d54110
into
CenterForOpenScience:feature/pbs-25-16
6 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
subscribe_osf_general_emailsetting is not updatedChanges
Added user record reload in the serializer.
This attribute is indeed updated within
mailchimp_utils.subscribe_mailchimpcall but when we return back to the serializer, this update is lost. I assume it happens becausemailchimp_utils.subscribe_mailchimpfetches user instance withOSFUser.load()that updates user but the serializer works with the old version of this user.Moving
user.reload()tomailchimp_utils.subscribe_mailchimpdoesn't fix the issue, while addinginstance.mailchimp_mailing_lists[MAILCHIMP_GENERAL_LIST] = Truein the serializer fixes it that confirms my assumption above.Ticket
https://openscience.atlassian.net/browse/ENG-8743