Skip to content

Commit 5a417ed

Browse files
committed
special char issue
1 parent 35eb2df commit 5a417ed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/api/migratepg.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,15 @@ console.log(payload[fieldname]['old'])
177177
buffferupcond=0
178178
columnNames.forEach((colName) => {
179179
colobj = payload[colName]
180-
values.push(colobj.new);
180+
if ( ( datatypeobj[colName] == 'timestamp' || datatypeobj[colName] == 'numeric' || datatypeobj[colName] == 'date' ) && colobj['new'].toUpperCase() == 'NULL' )
181+
{
182+
values.push(null);
183+
}
184+
else
185+
{
186+
values.push(colobj.new);
187+
}
188+
//values.push(colobj.new);
181189
if (buffferupcond == 1) {
182190
updatestr = updatestr + " , "
183191
}

0 commit comments

Comments
 (0)