Skip to content

Commit 0498bd7

Browse files
committed
Fix slot
* Download: Expand slots.room * Transform: Parse first slot
1 parent e00ead4 commit 0498bd7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
# Build resource list dynamically based on exclusions
3030
resources = [
31-
"submissions?state=confirmed&expand=answers.question,submission_type,track",
31+
"submissions?state=confirmed&expand=answers.question,submission_type,track,slots.room",
3232
"speakers?questions=all",
3333
]
3434

src/models/pretalx.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PretalxSlot(BaseModel):
3333
@classmethod
3434
def handle_localized(cls, v) -> str | None:
3535
if isinstance(v, dict):
36-
return v.get("en")
36+
return v["name"].get("en")
3737
return v
3838

3939

@@ -96,8 +96,9 @@ def handle_resources(cls, v) -> list[dict[str, str]] | None:
9696
@classmethod
9797
def process_values(cls, values) -> dict:
9898
# Set slot information
99-
if values.get("slot"):
100-
slot = PretalxSlot.model_validate(values["slot"])
99+
if values.get("slots"):
100+
slot = PretalxSlot.model_validate(values["slots"][0])
101+
values["slot"] = slot
101102
values["room"] = slot.room
102103
values["start"] = slot.start
103104
values["end"] = slot.end

0 commit comments

Comments
 (0)