Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion server/utils/pretalx/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export function parseSlot(slotId: Slot['id'], pretalxData: PretalxResult): Parse
const slot = slotMap[slotId]

if (!slot) {
throw createError(`Slot not found: ${slotId}`)
console.error(`Slot not found: ${slotId}`)
return null
Comment on lines 77 to +79

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject sessions whose referenced slot is missing

When Pretalx returns a confirmed submission whose slots[0] points to a slot record that is absent from pretalxData.slots.map, this now returns null; the list endpoint drops that session, but server/api/session/[id]/index.get.ts continues with optional chaining and returns a 200 response with missing room/start/end. That makes a dangling-slot session accessible as an incomplete detail/API response even though it is absent from the schedule, so the detail route should treat a null slot like the existing “Slot not found” case or otherwise filter it consistently.

Useful? React with 👍 / 👎.

}

const roomId = slot.room
Expand Down