From ae404ccfe037cef0975c6abb79e56a273fc6f9f7 Mon Sep 17 00:00:00 2001 From: Jonas Rabenstein <rabenstein@cs.fau.de> Date: Fri, 17 Jan 2020 12:20:08 +0100 Subject: [PATCH] admin: update user before notify hook of charge Albeit the database will have the correct/updated amount of money, the notification would still report the old value. --- store/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/store/admin.py b/store/admin.py index 4af124c..983e847 100644 --- a/store/admin.py +++ b/store/admin.py @@ -178,6 +178,7 @@ class ChargeAdmin(AppendOnlyModelAdmin): user = models.UserData.objects.get(id=obj.user.id) user.money += obj.amount user.save() + obj.user = user notification = notify.Charge(obj) try: notification.execute() -- GitLab