fix: sort higher capacity rooms first in schedule editor (#4653)
* fix: handle rooms with capacity = None in schedule editor * fix: sort higher capacity rooms ahead of lower Sort was incorrect, this matches intent and comments.
This commit is contained in:
parent
b49d92e674
commit
a3673f25cb
|
@ -672,7 +672,7 @@ def edit_meeting_schedule(request, num=None, owner=None, name=None):
|
|||
# timeslot structure will be neighbors. The grouping algorithm relies on this!
|
||||
room_data[room.pk]['start_and_duration'],
|
||||
# Within each group, sort higher capacity rooms first.
|
||||
room.capacity,
|
||||
-room.capacity if room.capacity is not None else 1, # sort rooms with capacity = None at end
|
||||
# Finally, sort alphabetically by name
|
||||
room.name
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue