Merge branch 'fix_conso' into 'master'

Fix template for TemplateTransaction in Conso form

See merge request bde/nk20!50
This commit is contained in:
Benjamin Graillot 2020-03-09 11:56:08 +01:00
commit d058d05cee
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class ConsoForm(forms.ModelForm):
self.instance.destination = button.destination self.instance.destination = button.destination
self.instance.amount = button.amount self.instance.amount = button.amount
self.instance.reason = '{} ({})'.format(button.name, button.category) self.instance.reason = '{} ({})'.format(button.name, button.category)
self.instance.name = button.name self.instance.template = button
self.instance.category = button.category self.instance.category = button.category
super().save(commit) super().save(commit)