fix: Correct indentation for delete button in trading plan page
This commit is contained in:
parent
9369eadd47
commit
613f50ec5b
@ -1078,15 +1078,17 @@ def trading_plan_page():
|
||||
update_trading_plan(plan)
|
||||
st.success("Plan updated successfully!")
|
||||
st.experimental_set_query_params(rerun=True)
|
||||
except Exception as e:
|
||||
st.error(f"Error updating 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)}")
|
||||
# Delete button (at the same level as the update 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")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user