Skip to content

Commit 61821cf

Browse files
Account for Current Coops
1 parent 2feb462 commit 61821cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

conditional/util/housing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from conditional.util.ldap import ldap_get_onfloor_members
88
from conditional.util.ldap import ldap_is_current_student
99

10+
from conditional.models.models import CurrentCoops
1011
from conditional.models.models import OnFloorStatusAssigned
1112

1213
from conditional import db
@@ -29,7 +30,10 @@ def __get_ofm__():
2930
'time': m.onfloor_granted,
3031
'points': ldap_get_housing_points(m.uid)
3132
} for m in OnFloorStatusAssigned.query.all()
32-
if ldap_is_active(m.uid)]
33+
if ldap_is_active(m.uid)
34+
or CurrentCoops.query.filter(
35+
CurrentCoops.uid == m.uid and CurrentCoops.active
36+
).first() is not None]
3337

3438
# sort by housing points then by time in queue
3539
ofm.sort(key=lambda m: m['time'])

0 commit comments

Comments
 (0)