File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -1375,20 +1375,21 @@ func (table *ResultsTable) UpdateSidebar() {
13751375
13761376func (table * ResultsTable ) isAnInsertedRow (rowIndex int ) (isAnInsertedRow bool , DBChangeIndex int ) {
13771377 for i , dmlChange := range * table .state .listOfDBChanges {
1378- values := dmlChange .Values
1379-
1380- for _ , value := range values {
1381- if value .TableRowIndex == rowIndex {
1382- cellReference := table .GetCell (rowIndex , 0 ).GetReference ()
1383-
1384- isAnInsertedRow := cellReference != nil && cellReference .(string ) != "NULL&" && cellReference .(string ) != "EMPTY&" && cellReference .(string ) != "DEFAULT&"
1385-
1386- if isAnInsertedRow {
1387- return true , i
1388- }
1378+ for _ , value := range dmlChange .Values {
1379+ if value .TableRowIndex != rowIndex {
1380+ continue
13891381 }
1382+ cellReference := table .GetCell (rowIndex , 0 ).GetReference ()
1383+ if cellReference == nil {
1384+ break
1385+ }
1386+ switch cellReference .(string ) {
1387+ case "NULL&" , "EMPTY&" , "DEFAULT&" :
1388+ default :
1389+ return true , i
1390+ }
1391+ break
13901392 }
1391-
13921393 }
13931394 return false , - 1
13941395}
You can’t perform that action at this time.
0 commit comments