Skip to content

Commit f19991c

Browse files
committedMar 20, 2025·
Always create summary content for Welsh register
1 parent ae7821a commit f19991c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎pyscraper/regmem/wales/process.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,13 @@ def get_ms_details(ms_id: int, *, lang: Literal["en", "cy"] = "en") -> RegmemPer
160160

161161
if len(summary_options) == 1:
162162
if in_respect_of:
163-
summary_str = f"{summary_options[0]} ({in_respect_of})"
163+
entry.content = f"{summary_options[0]} ({in_respect_of})"
164164
else:
165-
summary_str = summary_options[0]
166-
entry.content = summary_str
165+
entry.content = summary_options[0]
166+
elif len(summary_options) > 1:
167+
entry.content = "|".join(
168+
f"{detail.display_as}: {detail.value}" for detail in entry.details
169+
)
167170
details_none = [x.value for x in entry.details if x.value == "None"]
168171
if len(details_none) != len(entry.details):
169172
category.entries.append(entry)

0 commit comments

Comments
 (0)
Please sign in to comment.