Fix bug which duplicates machines when no tests exist during registration

This commit is contained in:
AndyGrant committed 2018-06-12 21:17:15 -04:00
1 parent e814516ee4
commit 88ce2145f4
2 files changed
+3 -1

No files matched your search

-1
View File
@@ -94,7 +94,6 @@ def getMachine(machineid, username, osname, threads):
# Update to reflect new worload
machine.threads = int(threads)
machine.mnps = 0.00
machine.save()
return machine
def getWorkload(machine):
+3
View File
@@ -374,6 +374,9 @@ def getWorkload(request):
try: result = OpenBench.utils.getResult(machine, test)
except: return HttpResponse('None')
# Got everything
machine.save();
# Send ID's and test information as a string dictionary
return HttpResponse(str(OpenBench.utils.workloadDictionary(machine, result, test)))