Spaces:
Running
on
Zero
Running
on
Zero
Update history_manager.py
Browse files- 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',
|
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 |
}
|