rairo commited on
Commit
3cf490d
·
verified ·
1 Parent(s): 2d1be1b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -0
main.py CHANGED
@@ -318,6 +318,11 @@ def get_spending_overview():
318
  })
319
 
320
  # Drop rows missing essential fields.
 
 
 
 
 
321
  if df.empty:
322
  return jsonify({
323
  'daily_spending': [],
 
318
  })
319
 
320
  # Drop rows missing essential fields.
321
+ df.dropna(subset=['uid', 'total', 'items', 'date', 'receipt_number', 'timestamp', 'hash'], inplace=True)
322
+
323
+ # IMPORTANT FIX: Removed 'manual_entry' from the essential fields list
324
+ # This was causing manual_entry transactions to be filtered out if a user's first transaction was manual
325
+
326
  if df.empty:
327
  return jsonify({
328
  'daily_spending': [],