fix: Add default value for trade direction in debug output

This commit is contained in:
Bobby (aider) 2025-02-13 09:26:29 -08:00
parent f162cdb91b
commit 9493f5d7ac

View File

@ -395,10 +395,10 @@ def trading_journal_page():
st.markdown("---") st.markdown("---")
# Debug output # Debug output
st.write("Raw trade data:") st.write("Raw trade ")
for trade in trades: for trade in trades:
st.write({ st.write({
'direction': trade.get('direction'), 'direction': trade.get('direction', 'unknown'), # Add default value
'shares': trade.get('shares'), 'shares': trade.get('shares'),
'entry_price': trade.get('entry_price'), 'entry_price': trade.get('entry_price'),
'entry_date': trade.get('entry_date') 'entry_date': trade.get('entry_date')