This works ...
This commit is contained in:
1 parent
c977b07222
commit
2c220ad635
1 file changed
+5
-1
+5
-1
@@ -230,7 +230,11 @@ def update(request):
|
|||||||
finished = passed or failed
|
finished = passed or failed
|
||||||
|
|
||||||
# Update total # of games played for the User
|
# Update total # of games played for the User
|
||||||
Profile.objects.filter(user=user).update(games=F('games') + games)
|
for profile in Profile.objects.all():
|
||||||
|
if profile.user.username == request.POST['username']:
|
||||||
|
profile.games += games
|
||||||
|
profile.save()
|
||||||
|
break
|
||||||
|
|
||||||
# Just force an update to Machine.update
|
# Just force an update to Machine.update
|
||||||
Machine.objects.filter(id=machineid).update()
|
Machine.objects.filter(id=machineid).update()
|
||||||
|
|||||||
Reference in new issue
Block a user