Ensure that the default value for a column should be used if it is made empty. #5308
parent
033ee23eba
commit
3765131d21
|
@ -23,3 +23,5 @@ Housekeeping
|
|||
|
||||
Bug fixes
|
||||
*********
|
||||
|
||||
| `Issue #5308 <https://github.com/pgadmin-org/pgadmin4/issues/5308>`_ - Ensure that the default value for a column should be used if it is made empty.
|
||||
|
|
|
@ -1248,6 +1248,11 @@ export function ResultSet() {
|
|||
let row = newRows[otherInfo.indexes[0]];
|
||||
let clientPK = rowKeyGetter(row);
|
||||
|
||||
// Check if column is pk and value is null set it to default value.
|
||||
if(otherInfo.column.has_default_val && _.isNull(row[otherInfo.column.key])) {
|
||||
row[otherInfo.column.key] = undefined;
|
||||
}
|
||||
|
||||
if(clientPK in (dataChangeStore.added || {})) {
|
||||
/* No need to track this */
|
||||
} else if(clientPK in (dataChangeStore.updated || {})) {
|
||||
|
|
Loading…
Reference in New Issue