diff --git a/opentech/apply/activity/messaging.py b/opentech/apply/activity/messaging.py index 512f3ea6cf9a0ecb088860ac5d5c9c6752ca673e..0e854a5833d09a116a350961bc3fb2cc914f124e 100644 --- a/opentech/apply/activity/messaging.py +++ b/opentech/apply/activity/messaging.py @@ -21,7 +21,7 @@ class MessageAdapter: class ActivityAdapter: messages = { MESSAGES.NEW_SUBMISSION: 'Submitted {submission.title} for {submission.page.title}', - MESSAGES.UPDATE_LEAD: 'Lead changed from {old.lead} to {new.lead}', + MESSAGES.UPDATE_LEAD: 'Lead changed from {old.lead} to {submission.lead}', MESSAGES.NEW_DETERMINATION: 'Created a determination for {submission.title}', MESSAGES.DETERMINATION_OUTCOME: 'Sent a {submission.determination.get_outcome_display} determination for {submission.title}:\r\n{determination.clean_message}', MESSAGES.INVITED_TO_PROPOSAL: '{submission.title} has been invited to submit a proposal.', diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py index 554e39c34e52357ed098c38ace11f81801ef108b..07eff41865a58de26b4f907377310e14f2519d48 100644 --- a/opentech/apply/funds/views.py +++ b/opentech/apply/funds/views.py @@ -98,13 +98,11 @@ class UpdateLeadView(DelegatedViewMixin, UpdateView): # Fetch the old lead from the database old = copy(self.get_object()) response = super().form_valid(form) - new = form.instance messenger( MESSAGES.UPDATE_LEAD, user=self.request.user, - submission=self.kwargs['submission'], + submission=form.instance, old=old, - new=new, ) return response