Skip to content

Commit

Permalink
Merge pull request #279 from mebis-lp/Fix_core_calendar_test
Browse files Browse the repository at this point in the history
Fix core test core_calendar\container_test
  • Loading branch information
Laur0r authored Sep 19, 2023
2 parents b628619 + a75bcd9 commit 2dfa57e
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 2dfa57e

Please sign in to comment.