Frontend table builder performance impoves

This commit is contained in:
norohind committed 2021-11-29 00:48:21 +03:00
1 parent 7d132ecb5f
commit cebe77cc09
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -61,7 +61,7 @@ class ActivityHtml:
table_in_json: str = resp.text
resp.content_type = falcon.MEDIA_HTML
resp.text = utils.activity_table_html_template.replace('{items}', json.dumps(table_in_json))
resp.text = utils.activity_table_html_template.replace('{items}', table_in_json)
# what? f-strings? .format? never heard about them
@@ -85,7 +85,7 @@ class ActivityDiffHtml:
resp.content_type = falcon.MEDIA_HTML
# table: str = json.dumps(model.get_diff_action_id(action_id))
resp.text = utils.activity_table_html_template.replace(
'{items}', json.dumps(json.dumps(model.get_diff_action_id(action_id)))
'{items}', json.dumps(model.get_diff_action_id(action_id))
)