AUXteam commited on
Commit
ddb005f
·
verified ·
1 Parent(s): 3ad83e6

Fix: Fallback handling for empty JSON extraction in backend manager

Browse files
backend/services/tinytroupe_manager.py CHANGED
@@ -136,7 +136,8 @@ class TinyTroupeSimulationManager:
136
  )
137
 
138
  # Safe parsing fallback
139
- if extracted_data is None:
 
140
  extracted_data = {}
141
 
142
  parsed_response = {
 
136
  )
137
 
138
  # Safe parsing fallback
139
+ if extracted_data is None or type(extracted_data) is not dict:
140
+ extracted_data = {}
141
  extracted_data = {}
142
 
143
  parsed_response = {