DawnC commited on
Commit
fef83b7
1 Parent(s): 1fd2486

Update history_manager.py

Browse files
Files changed (1) hide show
  1. history_manager.py +2 -2
history_manager.py CHANGED
@@ -54,12 +54,12 @@ class UserHistoryManager:
54
  # 確保結果資料的完整性
55
  if results and isinstance(results, list):
56
  processed_results = []
57
- for result in results:
58
  # 確保每個結果都包含必要的欄位
59
  if isinstance(result, dict):
60
  processed_result = {
61
  'breed': result.get('breed', 'Unknown'),
62
- 'overall_score': result.get('overall_score', result.get('final_score', 0)),
63
  'rank': result.get('rank', 0),
64
  'size': result.get('size', 'Unknown')
65
  }
 
54
  # 確保結果資料的完整性
55
  if results and isinstance(results, list):
56
  processed_results = []
57
+ for result in results[:15]:
58
  # 確保每個結果都包含必要的欄位
59
  if isinstance(result, dict):
60
  processed_result = {
61
  'breed': result.get('breed', 'Unknown'),
62
+ 'overall_score': result.get('overall_score', 0),
63
  'rank': result.get('rank', 0),
64
  'size': result.get('size', 'Unknown')
65
  }