diff options
author | Sean Smith <ssmith@iol.unh.edu> | 2021-03-08 17:15:42 -0500 |
---|---|---|
committer | Sean Smith <ssmith@iol.unh.edu> | 2021-03-08 17:15:42 -0500 |
commit | 85598208ad7b65de9e4c60b509331a9b6ce46e52 (patch) | |
tree | 33214f29361504438cc7836f19a65743dd6a3e47 /src | |
parent | 8a902d357fa6eca07384d25fac32a6e0521a63e5 (diff) |
Filters non working servers in quick booking
Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Change-Id: I47776a3e239a333d544d9e6e86f702b1d299baeb
Diffstat (limited to 'src')
-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): |