Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Sep 5, 2024
2 parents 6491c6e + 5cc25a0 commit 7d69a04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sponsors/models/benefits.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ def create_benefit_feature(self, sponsor_benefit, **kwargs):

def get_clone_kwargs(self, new_benefit):
kwargs = super().get_clone_kwargs(new_benefit)
kwargs["internal_name"] = f"{self.internal_name}_{new_benefit.year}"
if str(self.benefit.year) in self.internal_name:
kwargs["internal_name"] = self.internal_name.replace(str(self.benefit.year), str(new_benefit.year))
else:
kwargs["internal_name"] = f"{self.internal_name}_{new_benefit.year}"
due_date = kwargs.get("due_date")
if due_date:
kwargs["due_date"] = due_date.replace(year=new_benefit.year)
Expand Down

0 comments on commit 7d69a04

Please sign in to comment.