summaryrefslogtreecommitdiffstats
path: root/dashboard/src
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard/src')
-rw-r--r--dashboard/src/api/models.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/dashboard/src/api/models.py b/dashboard/src/api/models.py
index e17a911..c165454 100644
--- a/dashboard/src/api/models.py
+++ b/dashboard/src/api/models.py
@@ -782,14 +782,12 @@ class JobFactory(object):
net_relation.status = JobStatus.NEW
# re-apply ssh access after host is reset
- ssh_relation = AccessRelation.objects.get(job=job, config__access_type="ssh")
- ssh_relation.status = JobStatus.NEW
+ for relation in AccessRelation.objects.filter(job=job, config__access_type="ssh"):
+ relation.status = JobStatus.NEW
+ relation.save()
- # save them all at once to reduce the chance
- # of a lab polling and only seeing partial change
hardware_relation.save()
net_relation.save()
- ssh_relation.save()
@classmethod
def makeSnapshotTask(cls, image, booking, host):