Skip to content

Commit

Permalink
Fix FK check
Browse files Browse the repository at this point in the history
  • Loading branch information
HaGuesto committed Nov 28, 2021
1 parent 4034706 commit a56f23c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/lib/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function listDelete($table, $ids, $uri = false, $fktables = null)
if (count($foreignkeys) > 0) {
foreach ($foreignkeys as $foreignkey) {
// Do we want to check the foreign key and does the foreign key restrict the delete?
if (in_array($foreignkey['TABLE_NAME'], $fktables) && ('RESTRICT' == $foreignkey['DELETE_RULE'])) {
if (in_array($foreignkey['TABLE_NAME'], $fktables) && (('RESTRICT' == $foreignkey['DELETE_RULE']) || ('NO ACTION' == $foreignkey['DELETE_RULE']))) {
if (db_fieldexists($foreignkey['TABLE_NAME'], 'label')) {
$namestring = ',b.label AS label';
} elseif (db_fieldexists($foreignkey['TABLE_NAME'], 'naam')) {
Expand Down

0 comments on commit a56f23c

Please sign in to comment.