Fixed race condition when transacting to own user

This commit is contained in:
Sebastian Lohff 2011-10-25 19:41:02 +02:00
父節點 16cfd63e4a
當前提交 f432ffc70b
共有 1 個檔案被更改,包括 8 行新增7 行删除

查看文件

@ -59,6 +59,7 @@ class VirtualTransaction(models.Model):
@staticmethod
def moveMoney(fromUser, toUser, amount, commit=True):
if fromUser != toUser:
fromProfile = fromUser.get_profile()
toProfile = toUser.get_profile()
fromProfile.balance -= amount