diff --git a/src/streamlit_app.py b/src/streamlit_app.py index 331ec03..30dbd37 100644 --- a/src/streamlit_app.py +++ b/src/streamlit_app.py @@ -1079,14 +1079,14 @@ def trading_plan_page(): st.success("Plan updated successfully!") st.experimental_set_query_params(rerun=True) - # Add delete button - if st.button("Delete Plan", key="delete_plan_button"): - try: - delete_trading_plan(plan.id) - st.success("Plan deleted successfully!") - st.experimental_set_query_params(rerun=True) - except Exception as e: - st.error(f"Error deleting plan: {str(e)}") + # Add delete button + if st.button("Delete Plan", key="delete_plan_button"): + try: + delete_trading_plan(plan.id) + st.success("Plan deleted successfully!") + st.experimental_set_query_params(rerun=True) + except Exception as e: + st.error(f"Error deleting plan: {str(e)}") else: st.info("No plans available to edit")