From 79b9131049b24e40706c6cbee0fe10d064021803 Mon Sep 17 00:00:00 2001
From: Benjamin Graillot <graillot@crans.org>
Date: Mon, 9 Mar 2020 11:51:20 +0100
Subject: [PATCH] [note] Fix template for TemplateTransaction in Conso form

---
 apps/note/forms.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/note/forms.py b/apps/note/forms.py
index 07e44206..20804412 100644
--- a/apps/note/forms.py
+++ b/apps/note/forms.py
@@ -108,7 +108,7 @@ class ConsoForm(forms.ModelForm):
         self.instance.destination = button.destination
         self.instance.amount = button.amount
         self.instance.reason = '{} ({})'.format(button.name, button.category)
-        self.instance.name = button.name
+        self.instance.template = button
         self.instance.category = button.category
         super().save(commit)
 
-- 
GitLab