broadfield-dev commited on
Commit
23fe7e3
·
verified ·
1 Parent(s): c9bb987

Update processor.py

Browse files
Files changed (1) hide show
  1. processor.py +4 -2
processor.py CHANGED
@@ -302,10 +302,13 @@ class DatasetCommandCenter:
302
  new_row[target_col] = val
303
 
304
  elif t_type == 'requests':
 
305
  # Lazy Context Creation: Only pay the cost if used
306
  eval_context = row.copy()
307
  eval_context['row'] = row
308
- val = eval(col_def['rpay'], {}, eval_context)
 
 
309
  print(val)
310
  new_row[target_col] = requests.post(col_def['rurl'], json=val).text
311
 
@@ -452,7 +455,6 @@ The following operations were applied to the source data:
452
  ctx['row'] = row
453
  ctx['json'] = json
454
  ctx['re'] = re
455
- ctx['requests'] = requests
456
  if not eval(recipe['filter_rule'], {}, ctx):
457
  passed = False
458
  except:
 
302
  new_row[target_col] = val
303
 
304
  elif t_type == 'requests':
305
+ print(t_type)
306
  # Lazy Context Creation: Only pay the cost if used
307
  eval_context = row.copy()
308
  eval_context['row'] = row
309
+ #val = eval(col_def['rpay'], {}, eval_context)
310
+ print(col_def['rpay'])
311
+ val = json.loads(col_def['rpay'])
312
  print(val)
313
  new_row[target_col] = requests.post(col_def['rurl'], json=val).text
314
 
 
455
  ctx['row'] = row
456
  ctx['json'] = json
457
  ctx['re'] = re
 
458
  if not eval(recipe['filter_rule'], {}, ctx):
459
  passed = False
460
  except: