diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-03-24 15:56:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2021-03-24 15:56:51 +0000 |
commit | e0a5e206a3a68bbae373bf8f9257b5aba14932c5 (patch) | |
tree | db65ff306fd674b2d8c276487a9883306d2627cd | |
parent | e23127473b81bdbc1f4630036ddec3c46ee17dda (diff) | |
parent | 85598208ad7b65de9e4c60b509331a9b6ce46e52 (diff) |
Merge "Filters non working servers in quick booking"
-rw-r--r-- | src/account/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/account/models.py b/src/account/models.py index 40de4d8..2a7b017 100644 --- a/src/account/models.py +++ b/src/account/models.py @@ -237,7 +237,7 @@ class Lab(models.Model): def get_available_resources(self): # Cannot import model normally due to ciruclar import Server = apps.get_model('resource_inventory', 'Server') # TODO: Find way to import ResourceQuery - resources = [str(resource.profile) for resource in Server.objects.filter(lab=self, booked=False)] + resources = [str(resource.profile) for resource in Server.objects.filter(lab=self, working=True, booked=False)] return dict(Counter(resources)) def __str__(self): |