Skip to content

Commit

Permalink
T1822 FIX child change triggering activation of sponsorship
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed Sep 24, 2024
1 parent b544f55 commit 33af52a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sponsorship_compassion/models/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,11 @@ def upsert_sponsorship(self):
##########################################################################
def _on_language_changed(self):
"""Update the preferred language in GMC."""
messages = self.upsert_sponsorship().with_context({"async_mode": False})
messages = (
self.filtered("gmc_commitment_id")
.with_context({"async_mode": False})
.upsert_sponsorship()
)
error_msg = (
"Error when updating sponsorship language. "
"You may be out of sync with GMC - please try again."
Expand Down

0 comments on commit 33af52a

Please sign in to comment.