mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where insert was failing when copy pasting a row and saving in result grid. #5934
This commit is contained in:
parent
17a4faeb6b
commit
6c7116a20c
@ -1292,6 +1292,11 @@ export function ResultSet() {
|
||||
const onRowsChange = (newRows, otherInfo)=>{
|
||||
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]) && otherInfo.column.key in queryData.primary_keys) {
|
||||
row[otherInfo.column.key] = undefined;
|
||||
}
|
||||
|
||||
if(clientPK in (dataChangeStore.added || {})) {
|
||||
/* No need to track this */
|
||||
|
Loading…
Reference in New Issue
Block a user