refactor: Replace st.experimental_rerun() with st.experimental_set_query_params(rerun=True)

This commit is contained in:
Bobby (aider) 2025-02-11 18:20:03 -08:00
parent d17dc47d42
commit 9897b9029b

View File

@ -310,7 +310,7 @@ def trading_journal_page():
update_trade(trade_id, updates)
st.success("Trade updated successfully!")
st.experimental_rerun()
st.experimental_set_query_params(rerun=True)
except Exception as e:
st.error(f"Error updating trade: {str(e)}")
else:
@ -723,7 +723,7 @@ def trading_system_page():
try:
update_portfolio_value(new_value, new_cash, notes)
st.success("Portfolio value updated successfully!")
st.experimental_rerun()
st.experimental_set_query_params(rerun=True)
except Exception as e:
st.error(f"Error updating portfolio value: {str(e)}")
@ -966,7 +966,7 @@ def trading_plan_page():
save_trading_plan(plan)
st.success("Trading plan created successfully!")
st.experimental_rerun()
st.experimental_set_query_params(rerun=True)
except Exception as e:
st.error(f"Error creating trading plan: {str(e)}")
@ -997,7 +997,7 @@ def trading_plan_page():
plan.status = PlanStatus(status)
update_trading_plan(plan)
st.success("Plan updated successfully!")
st.experimental_rerun()
st.experimental_set_query_params(rerun=True)
except Exception as e:
st.error(f"Error updating plan: {str(e)}")
else: