Skip to content

Commit

Permalink
Exclude declined requests from auto matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Dec 7, 2023
1 parent bfdf60e commit d8611fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/tuber/api/room_matcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from tuber.models import *
import tuber.config
from types import SimpleNamespace
from sqlalchemy import or_
import multiprocessing
import itertools
import datetime
Expand Down Expand Up @@ -197,7 +198,7 @@ def load_staffers(db, event, hotel_block):
room_nights = db.query(HotelRoomNight).filter(
HotelRoomNight.event == event).all()
requests = db.query(HotelRoomRequest, Badge).join(Badge, Badge.id == HotelRoomRequest.badge).filter(
~HotelRoomRequest.room_night_assignments.any(), HotelRoomRequest.hotel_block == hotel_block).all()
~HotelRoomRequest.room_night_assignments.any(), HotelRoomRequest.hotel_block == hotel_block, or_(HotelRoomRequest.declined == None, HotelRoomRequest.declined == False).all()
staffers = []
for request, badge in requests:
staffer = HashNS()
Expand Down

0 comments on commit d8611fd

Please sign in to comment.