Update processor.py
Browse files- processor.py +5 -1
processor.py
CHANGED
|
@@ -303,7 +303,11 @@ class DatasetCommandCenter:
|
|
| 303 |
|
| 304 |
elif t_type == 'requests':
|
| 305 |
# Lazy Context Creation: Only pay the cost if used
|
| 306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
|
| 308 |
except Exception as e:
|
| 309 |
raise ValueError(f"Column '{target_col}' failed: {str(e)}")
|
|
|
|
| 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(json.loads(col_def['rpay']), {}, eval_context)
|
| 309 |
+
|
| 310 |
+
new_row[target_col] = requests.post(col_def['rurl'], json=val).text
|
| 311 |
|
| 312 |
except Exception as e:
|
| 313 |
raise ValueError(f"Column '{target_col}' failed: {str(e)}")
|