Cannot use .get() for some reason unknown to me
This commit is contained in:
1 parent
beb1df32ef
commit
07049b5bdb
2 files changed
+4
-1
No files matched your search
@@ -296,6 +296,7 @@ def reportResults(data, wins, losses, draws, crashes, timeloss):
|
|||||||
'timeloss' : timeloss,
|
'timeloss' : timeloss,
|
||||||
'username' : USERNAME,
|
'username' : USERNAME,
|
||||||
'password' : PASSWORD,
|
'password' : PASSWORD,
|
||||||
|
'profileid' : data['profile']['id'],
|
||||||
'machineid' : data['machine']['id'],
|
'machineid' : data['machine']['id'],
|
||||||
'resultid' : data['result']['id'],
|
'resultid' : data['result']['id'],
|
||||||
'testid' : data['test']['id']}
|
'testid' : data['test']['id']}
|
||||||
|
|||||||
+3
-1
@@ -169,6 +169,7 @@ def workloadDictionary(machine, result, test):
|
|||||||
# specification for both engines. Group the dev and base
|
# specification for both engines. Group the dev and base
|
||||||
# options with the coressponding engine, for easy usage
|
# options with the coressponding engine, for easy usage
|
||||||
return {
|
return {
|
||||||
|
'profile' : { 'id' : profile.id },
|
||||||
'machine' : { 'id' : machine.id, },
|
'machine' : { 'id' : machine.id, },
|
||||||
'result' : { 'id' : result.id, },
|
'result' : { 'id' : result.id, },
|
||||||
'test' : {
|
'test' : {
|
||||||
@@ -213,6 +214,7 @@ def update(request):
|
|||||||
games = wins + losses + draws
|
games = wins + losses + draws
|
||||||
|
|
||||||
# Parse the various IDs sent back
|
# Parse the various IDs sent back
|
||||||
|
profileid = int(request.POST['profileid'])
|
||||||
machineid = int(request.POST['machineid'])
|
machineid = int(request.POST['machineid'])
|
||||||
resultid = int(request.POST['resultid'])
|
resultid = int(request.POST['resultid'])
|
||||||
testid = int(request.POST['testid'])
|
testid = int(request.POST['testid'])
|
||||||
@@ -230,7 +232,7 @@ 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)
|
Profile.objects.filter(id=profileid).update(games=F('games') + games)
|
||||||
|
|
||||||
# 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