Skip to content

Commit 71d89a0

Browse files
committed
fix(desk/allocations): ensure comparisons are case insensitive
1 parent 1b05624 commit 71d89a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/place/desk/allocations.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Place::Desk::Allocations < PlaceOS::Driver
9494
desk["features"].as_a?.try(&.map(&.as_s).first?),
9595
level_code,
9696
building_code,
97-
desk["assigned_to"]?.try(&.as_s?.presence),
97+
desk["assigned_to"]?.try(&.as_s?.presence.try(&.downcase)),
9898
building.id,
9999
level.id
100100
)
@@ -176,8 +176,8 @@ class Place::Desk::Allocations < PlaceOS::Driver
176176
break unless csv.next
177177
row = csv.row
178178
desk_id = row[0]
179-
allocated_email = row[2]
180-
bookable = !!allocated_email.presence || row[4].includes?("Hot")
179+
allocated_email = row[2].downcase.presence
180+
bookable = !!allocated_email || row[4].includes?("Hot")
181181
csv_allocations[desk_id] = Allocation.new(desk_id, row[1], allocated_email, bookable)
182182
end
183183

0 commit comments

Comments
 (0)