Skip to content

Commit

Permalink
Ensure correspondent is set in contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed Aug 13, 2024
1 parent fcb5c50 commit 6d8c967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sponsorship_compassion/models/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@ def create(self, vals):
correspondent_id = vals.get("correspondent_id")
if correspondent_id and correspondent_id != partner_id:
partner_ids.append(correspondent_id)
if not correspondent_id:
vals["correspondent_id"] = partner_id
if partner_ids:
other_nums = self.search(
[
Expand Down

0 comments on commit 6d8c967

Please sign in to comment.