Refactor template formatting in records_to_text function
This commit is contained in:
parent
0c153e659f
commit
6348da2de3
1 changed files with 1 additions and 1 deletions
|
|
@ -30,5 +30,5 @@ def records_to_text(template: str, records: list[Record]) -> str:
|
|||
records = [records]
|
||||
# Check if there are any format strings in the template
|
||||
|
||||
formated_records = [template.format(**record.data) for record in records]
|
||||
formated_records = [template.format(data=record.data, **record.data) for record in records]
|
||||
return "\n".join(formated_records)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue