Don't save a new Machine() until it is tasked

This commit is contained in:
Andrew Grant committed 2020-05-31 05:51:29 -04:00
1 parent f95df97e5a
commit 2b76f5c420
1 file changed
+1 -2
+1 -2
View File
@@ -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))