From 7df928d827d6d42a84d5d2bcc06d1c1138ceb6ae Mon Sep 17 00:00:00 2001 From: Sam Sucik Date: Tue, 1 Oct 2024 09:35:04 +0200 Subject: [PATCH] fix the displaying of any non-string values of variables included in the prompt (#18) Previously, non-string (e.g. numerical) values were breaking the variable values preview feature. --- prompterator/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompterator/main.py b/prompterator/main.py index 92f7351..2b4af5d 100644 --- a/prompterator/main.py +++ b/prompterator/main.py @@ -530,7 +530,7 @@ def set_up_prompt_vars_area(st_container, error_container): # create text of used prompt's variables and their values vars_values = "" for var in used_vars: - vars_values += var + ":\n " + st.session_state.row.get(var, "none") + "\n" + vars_values += var + ":\n " + str(st.session_state.row.get(var, "none")) + "\n" st_container.text_area( label=f"Attributes other than `{c.TEXT_ORIG_COL}` used in the prompt(s)",