Skip to content

Commit 7c6695d

Browse files
committed
Overwrite speaker.submissions with only publishable submissions
1 parent c204c1f commit 7c6695d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/utils/parse.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ def publishable_speakers(
3333
with open(input_file) as fd:
3434
js = json.load(fd)
3535
all_speakers = [PretalxSpeaker.model_validate(s) for s in js]
36-
speakers_with_publishable_sessions = [
37-
s
38-
for s in all_speakers
39-
if Utils.publishable_sessions_of_speaker(s, publishable_sessions_keys)
40-
]
36+
37+
speakers_with_publishable_sessions: list[PretalxSubmission] = []
38+
for speaker in all_speakers:
39+
if publishable_sessions := Utils.publishable_sessions_of_speaker(
40+
speaker, publishable_sessions_keys
41+
):
42+
speaker.submissions = publishable_sessions
43+
speakers_with_publishable_sessions.append(speaker)
44+
4145
publishable_speakers_by_code = {
4246
s.code: s for s in speakers_with_publishable_sessions
4347
}

0 commit comments

Comments
 (0)