Skip to content

Commit 7283e48

Browse files
committed
tweak
1 parent 190ec9a commit 7283e48

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/AppContext.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ export default class AppContext {
494494
if (typeof class_names == "string") {
495495
class_names = {...this.crudGetChildren(class_names)};
496496
}
497-
//
498497
let children = this.crudGetChildren(class_names);
499498
if (children) {
500499
class_names = {...children};
@@ -645,11 +644,11 @@ export default class AppContext {
645644
// Search below starts with row 0.
646645
let found_row = this.crudFindByKeyVals(pdh, p_KeyVals);
647646
// Looking for another record besides parent being deleted.
648-
if (found_row != null && found_row == parent_row)
649-
found_row = this.crudFindByKeyVals(pdh, p_KeyVals, parent_row);
647+
if (found_row == parent_row)
648+
found_row = this.crudFindByKeyVals(pdh, p_KeyVals, parent_row+1);
650649
// If at least one other row has the keyVals_p, then no need to delete
651650
// dependent records.
652-
if (found_row != null) {
651+
if (found_row == null) {
653652
let found_rows = [];
654653
// Now find any DEPENDENT table rows that have to be deleted.
655654
found_row = this.crudFindByKeyVals(ddh, d_KeyVals);

0 commit comments

Comments
 (0)