omri374 commited on
Commit
89035f8
1 Parent(s): e330702

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -140,7 +140,9 @@ class ToDictListEncoder(JSONEncoder):
140
 
141
  def default(self, o):
142
  """Encode to JSON using to_dict."""
143
- return [res.to_dict() for res in o]
 
 
144
 
145
 
146
  if st_return_decision_process:
 
140
 
141
  def default(self, o):
142
  """Encode to JSON using to_dict."""
143
+ if o:
144
+ return o.to_dict()
145
+ return []
146
 
147
 
148
  if st_return_decision_process: