From 2b76f5c420abe49129396d25d7fc917d6f086daa Mon Sep 17 00:00:00 2001 From: Andrew Grant Date: Sun, 31 May 2020 05:51:29 -0400 Subject: [PATCH] Don't save a new Machine() until it is tasked --- OpenBench/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenBench/utils.py b/OpenBench/utils.py index c031359..d842f85 100644 --- a/OpenBench/utils.py +++ b/OpenBench/utils.py @@ -270,8 +270,7 @@ def getMachine(machineid, user, osname, threads): # Create a new Machine if needed if machineid == 'None': - return Machine.objects.create( - user=user, osname=osname, threads=threads) + return Machine(user=user, osname=osname, threads=threads) # Fetch and verify the requested Machine try: machine = Machine.objects.get(id=int(machineid))