aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-07-28 06:10:51 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-07-28 06:10:51 +0100
commit4409c6f1b9a84f55adbdac906cee4a8b1a157a6e (patch)
treec8c8a6065cca1a33892c9bece18f1bf286c72cb3
parent02f3beac25065a5614b5bb548b1635ff051193ba (diff)
fixed bug where return.id was being left out of return_data row insert
-rw-r--r--pkg/datamaps/db.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/datamaps/db.go b/pkg/datamaps/db.go
index fb1785f..c930500 100644
--- a/pkg/datamaps/db.go
+++ b/pkg/datamaps/db.go
@@ -217,13 +217,13 @@ func importXLSXtoDB(dm_name string, return_name string, file string, db *sql.DB)
fmt.Errorf("cannot find a datamap_line row for %s and %s: %s\n", sheetName, cellRef, err)
}
- insertStmt, err := db.Prepare("insert into return_data (dml_id, value) values(?,?)")
+ insertStmt, err := db.Prepare("insert into return_data (dml_id, ret_id, value) values(?,?,?)")
if err != nil {
log.Fatal(err)
}
defer insertStmt.Close()
- res, err = insertStmt.Exec(dmlId, cellData.Value)
+ res, err = insertStmt.Exec(dmlId, retId, cellData.Value)
if err != nil {
log.Fatal(err)
}