Don't save a new Machine() until it is tasked
This commit is contained in:
1 parent
f95df97e5a
commit
2b76f5c420
1 file changed
+1
-2
+1
-2
@@ -270,8 +270,7 @@ def getMachine(machineid, user, osname, threads):
|
|||||||
|
|
||||||
# Create a new Machine if needed
|
# Create a new Machine if needed
|
||||||
if machineid == 'None':
|
if machineid == 'None':
|
||||||
return Machine.objects.create(
|
return Machine(user=user, osname=osname, threads=threads)
|
||||||
user=user, osname=osname, threads=threads)
|
|
||||||
|
|
||||||
# Fetch and verify the requested Machine
|
# Fetch and verify the requested Machine
|
||||||
try: machine = Machine.objects.get(id=int(machineid))
|
try: machine = Machine.objects.get(id=int(machineid))
|
||||||
|
|||||||
Reference in new issue
Block a user