Cannot use .get() for some reason unknown to me

This commit is contained in:
AndyGrant committed 2018-06-12 23:20:00 -04:00
1 parent beb1df32ef
commit 07049b5bdb
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -296,6 +296,7 @@ def reportResults(data, wins, losses, draws, crashes, timeloss):
'timeloss' : timeloss,
'username' : USERNAME,
'password' : PASSWORD,
'profileid' : data['profile']['id'],
'machineid' : data['machine']['id'],
'resultid' : data['result']['id'],
'testid' : data['test']['id']}
+3 -1
View File
@@ -169,6 +169,7 @@ def workloadDictionary(machine, result, test):
# specification for both engines. Group the dev and base
# options with the coressponding engine, for easy usage
return {
'profile' : { 'id' : profile.id },
'machine' : { 'id' : machine.id, },
'result' : { 'id' : result.id, },
'test' : {
@@ -213,6 +214,7 @@ def update(request):
games = wins + losses + draws
# Parse the various IDs sent back
profileid = int(request.POST['profileid'])
machineid = int(request.POST['machineid'])
resultid = int(request.POST['resultid'])
testid = int(request.POST['testid'])
@@ -230,7 +232,7 @@ def update(request):
finished = passed or failed
# Update total # of games played for the User
Profile.objects.filter(user=user).update(games=F('games') + games)
Profile.objects.filter(id=profileid).update(games=F('games') + games)
# Just force an update to Machine.update
Machine.objects.filter(id=machineid).update()