Skip to content
Open
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
5 changes: 5 additions & 0 deletions congress/tasks/bill_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ def summary_for(summaries):
# Take the most recent summary, by looking at the lexicographically last updateDate.
summary = sorted(summaries, key = lambda s: s['updateDate'])[-1]

# Congress 118 and after wrap 'text' inside of a 'cdata' field
text = summary.get('text', '')
if not text:
cdata = summary.get('cdata', '')
if isinstance(cdata, dict):
text = cdata.get('text', '')

# Build dict.
return {
Expand Down