Skip to content

Commit

Permalink
Fix core test core_calendar\container_test
Browse files Browse the repository at this point in the history
  • Loading branch information
PhMemmel committed Sep 18, 2023
1 parent b628619 commit a75bcd9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ function ratingallocate_delete_instance($id) {
'ratingallocateid' => $ratingallocate->id
), '', 'id'));

list ($insql, $params) = $DB->get_in_or_equal($deleteids);

$DB->delete_records_select('ratingallocate_group_choices',
if (!empty($deleteids)) {
list ($insql, $params) = $DB->get_in_or_equal($deleteids);
$DB->delete_records_select('ratingallocate_group_choices',
'choiceid ' . $insql, $params);

$DB->delete_records_select('ratingallocate_ch_gengroups',
'choiceid ' . $insql, $params);
$DB->delete_records_select('ratingallocate_ch_gengroups',
'choiceid ' . $insql, $params);
}

$DB->delete_records('ratingallocate_groupings', array(
'ratingallocateid' => $ratingallocate->id
Expand Down

0 comments on commit a75bcd9

Please sign in to comment.