fixed
This commit is contained in:
@@ -126,8 +126,23 @@ pub async fn post_table_data(
|
||||
.map_err(|e| Status::invalid_argument(e.to_string()))?;
|
||||
|
||||
// Get source column from operation
|
||||
let source_column = match operation {
|
||||
ScriptOperation::SetToColumn { source } => source,
|
||||
let source_column =
|
||||
match operation {
|
||||
ScriptOperation::SetToLocalColumn { source } => source,
|
||||
ScriptOperation::SetToExternalColumn { table, column } => {
|
||||
// For external columns, we need to resolve the value from the external table
|
||||
let external_source = format!("@{}.{}", table, column);
|
||||
let resolved_value = execution::resolve_value(
|
||||
db_pool,
|
||||
profile_id,
|
||||
&table_name,
|
||||
&data,
|
||||
&external_source
|
||||
).await.map_err(|e| Status::invalid_argument(e.to_string()))?;
|
||||
|
||||
// Return the resolved value
|
||||
resolved_value
|
||||
}
|
||||
};
|
||||
|
||||
// Check source column presence
|
||||
|
||||
Reference in New Issue
Block a user