summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2009-05-28 17:51:15 -0400
committerBill Peck <bpeck@redhat.com>2009-05-28 17:51:15 -0400
commitf0fc05e7209854c495b8f2ad2408cd048ed52047 (patch)
tree69a6c63c19cdf6b3aa842ac25a60a0f6b6741d91
parent3b1ea66fee0e6e71433cd0dacf746fe051aa5143 (diff)
available and free should only show Working systems
-rw-r--r--Server/beaker/server/model.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Server/beaker/server/model.py b/Server/beaker/server/model.py
index 43740df..5760b7b 100644
--- a/Server/beaker/server/model.py
+++ b/Server/beaker/server/model.py
@@ -683,7 +683,8 @@ class System(SystemObject):
Builds on all. Only systems which this user has permission to reserve.
If a system is loaned then its only available for that person.
"""
- return System.all(user).filter(
+ return System.all(user).filter(and_(
+ System.status==SystemStatus.by_name(u'Working'),
or_(and_(System.owner==user,
System.loaned==None),
System.loaned==user,
@@ -696,6 +697,7 @@ class System(SystemObject):
User.user_id==user.user_id
)
)
+ )
)
@classmethod