fix: Handle missing trade direction by defaulting to 'Buy'
This commit is contained in:
parent
fb27bf3003
commit
c030f87d9a
@ -321,7 +321,7 @@ def trading_journal_page():
|
|||||||
else:
|
else:
|
||||||
st.metric("Entry Price", f"${trade['entry_price']:.2f}")
|
st.metric("Entry Price", f"${trade['entry_price']:.2f}")
|
||||||
st.metric("Shares", trade['shares'])
|
st.metric("Shares", trade['shares'])
|
||||||
st.metric("Type", trade['direction'].capitalize())
|
st.metric("Type", trade.get('direction', 'Buy').capitalize())
|
||||||
|
|
||||||
with col2:
|
with col2:
|
||||||
if trade['direction'] == 'buy':
|
if trade['direction'] == 'buy':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user