bugfix
Browse files- sdc_view.py +5 -1
sdc_view.py
CHANGED
@@ -475,11 +475,15 @@ def render_sdc():
|
|
475 |
with jsonTab:
|
476 |
|
477 |
# Convert the session state to a JSON string
|
|
|
|
|
|
|
|
|
478 |
session_state_json = json.dumps(serialize_session_state(), indent=4)
|
479 |
st.download_button(
|
480 |
label="Download JSON",
|
481 |
data=session_state_json,
|
482 |
-
file_name=
|
483 |
mime="application/json"
|
484 |
)
|
485 |
# Display the session state as pretty JSON
|
|
|
475 |
with jsonTab:
|
476 |
|
477 |
# Convert the session state to a JSON string
|
478 |
+
if 'master_title' in st.session_state:
|
479 |
+
filename = f"{st.session_state['master_title']}_diveristy_card.json"
|
480 |
+
else:
|
481 |
+
filename = f"diveristy_card.json"
|
482 |
session_state_json = json.dumps(serialize_session_state(), indent=4)
|
483 |
st.download_button(
|
484 |
label="Download JSON",
|
485 |
data=session_state_json,
|
486 |
+
file_name=filename,
|
487 |
mime="application/json"
|
488 |
)
|
489 |
# Display the session state as pretty JSON
|