All transactions are now atomic
This commit is contained in:
parent
860c7b50e5
commit
9b090a145c
15 changed files with 61 additions and 20 deletions
|
|
@ -4,6 +4,7 @@
|
|||
from crispy_forms.helper import FormHelper
|
||||
from crispy_forms.layout import Submit
|
||||
from django import forms
|
||||
from django.db import transaction
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from note_kfet.inputs import AmountInput
|
||||
|
||||
|
|
@ -149,6 +150,7 @@ class LinkTransactionToRemittanceForm(forms.ModelForm):
|
|||
self.instance.transaction.bank = cleaned_data["bank"]
|
||||
return cleaned_data
|
||||
|
||||
@transaction.atomic
|
||||
def save(self, commit=True):
|
||||
"""
|
||||
Save the transaction and the remittance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue