Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Add backup description
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 12, 2024
1 parent 6b1f593 commit f442602
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/sources/rosetta/lib/response_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,17 @@ def description(self) -> str:
if doc_value := document(tag).text():
return doc_value
return description
if default_description := next(
(
item["value"]
for item in self.source["description"]
if "value" in item
and "type" in item
and item["type"] == "description"
),
None,
):
return default_description
return ""

def functions(self) -> str:
Expand Down

0 comments on commit f442602

Please sign in to comment.