Spaces:
Running
on
Zero
Running
on
Zero
Update history_manager.py
Browse files- history_manager.py +10 -3
history_manager.py
CHANGED
@@ -67,9 +67,16 @@ class UserHistoryManager:
|
|
67 |
history_entry["results"] = processed_results
|
68 |
|
69 |
# 加入使用者偏好設定(如果有的話)
|
70 |
-
if user_preferences:
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
history_entry["preferences"] = user_preferences
|
74 |
|
75 |
# 讀取現有歷史
|
|
|
67 |
history_entry["results"] = processed_results
|
68 |
|
69 |
# 加入使用者偏好設定(如果有的話)
|
70 |
+
if user_preferences:
|
71 |
+
formatted_preferences = {
|
72 |
+
'living_space': user_preferences.get('living_space'),
|
73 |
+
'exercise_time': user_preferences.get('exercise_time'),
|
74 |
+
'grooming_commitment': user_preferences.get('grooming_commitment'),
|
75 |
+
'experience_level': user_preferences.get('experience_level'),
|
76 |
+
'has_children': user_preferences.get('has_children'),
|
77 |
+
'noise_tolerance': user_preferences.get('noise_tolerance'),
|
78 |
+
'size_preference': user_preferences.get('size_preference')
|
79 |
+
}
|
80 |
history_entry["preferences"] = user_preferences
|
81 |
|
82 |
# 讀取現有歷史
|