Skip to content

Commit 27c1892

Browse files
committed
Deserialization: Handle non-expanded submission.resources
Workaround for pretalx/pretalx#2040
1 parent 2eb8b2c commit 27c1892

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/models/pretalx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ def duration_to_string(cls, v) -> str:
9090
@field_validator("resources", mode="before")
9191
@classmethod
9292
def handle_resources(cls, v) -> list[dict[str, str]] | None:
93+
if v and all(isinstance(res, int) for res in v):
94+
# currently, ?expand=resources is broken in Pretalx
95+
# https://github.com/pretalx/pretalx/issues/2040
96+
return None
9397
return v or None
9498

9599
@model_validator(mode="before")

0 commit comments

Comments
 (0)