Prevent superusers when they make a transaction with a non-member user
This commit is contained in:
parent
2851d7764c
commit
018ca84e2d
5 changed files with 45 additions and 9 deletions
|
|
@ -202,7 +202,8 @@ class Transaction(PolymorphicModel):
|
|||
When saving, also transfer money between two notes
|
||||
"""
|
||||
with transaction.atomic():
|
||||
self.refresh_from_db()
|
||||
if self.pk:
|
||||
self.refresh_from_db()
|
||||
self.source.refresh_from_db()
|
||||
self.destination.refresh_from_db()
|
||||
self.validate(False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue