You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: editoast/src/views/infra/mod.rs
+10-2
Original file line number
Diff line number
Diff line change
@@ -290,7 +290,7 @@ async fn clone(
290
290
for object inObjectType::iter(){
291
291
let model_table = object.get_table();
292
292
let model = sql_query(format!(
293
-
"INSERT INTO {model_table}(obj_id,data,infra_id) SELECT obj_id,data,$1 FROM {model_table} WHERE infra_id=$2"
293
+
"INSERT INTO {model_table}(obj_id,data,infra_id) SELECT obj_id,data,$1 FROM {model_table} WHERE infra_id = $2"
294
294
))
295
295
.bind::<BigInt,_>(cloned_infra.id.unwrap())
296
296
.bind::<BigInt,_>(infra)
@@ -304,7 +304,7 @@ async fn clone(
304
304
"INSERT INTO {layer_table}(obj_id,geographic,schematic,infra_id) SELECT obj_id,geographic,schematic,$1 FROM {layer_table} WHERE infra_id=$2")
305
305
}else{
306
306
format!(
307
-
"INSERT INTO {layer_table}(obj_id,geographic,schematic,infra_id, angle_geo, angle_sch) SELECT obj_id,geographic,schematic,$1,angle_geo,angle_sch FROM {layer_table} WHERE infra_id=$2"
307
+
"INSERT INTO {layer_table}(obj_id,geographic,schematic,infra_id, angle_geo, angle_sch) SELECT obj_id,geographic,schematic,$1,angle_geo,angle_sch FROM {layer_table} WHERE infra_id = $2"
308
308
)
309
309
};
310
310
@@ -316,7 +316,15 @@ async fn clone(
316
316
}
317
317
}
318
318
319
+
// Add error layers
320
+
let error_layer = sql_query("INSERT INTO infra_layer_error(geographic, schematic, information, infra_id) SELECT geographic, schematic, information, $1 FROM infra_layer_error WHERE infra_id = $2")
0 commit comments