Skip to content
Snippets Groups Projects
Commit 0f312eb8 authored by Benjamin Hättasch's avatar Benjamin Hättasch Committed by Nadja Geisler
Browse files

Only check room size if interest > -1

This prevents warning for AKs where interest was not specified and room capacity is quite small.
This resolves #209
parent 15914cf9
No related branches found
No related tags found
1 merge request!215Improve scheduling
......@@ -80,8 +80,8 @@ def check_capacity_for_slot(slot: AKSlot):
:rtype: ConstraintViolation or None
"""
# If slot is scheduled in a room
if slot.room and slot.room.capacity >= 0:
# If slot is scheduled in a room and interest was specified
if slot.room and slot.room.capacity >= 0 and slot.ak.interest >= 0:
# Create a violation if interest exceeds room capacity
if slot.room.capacity < slot.ak.interest:
c = ConstraintViolation(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment