Skip to content

Commit

Permalink
Fix a bug that prevents local_o365 with incomplete configuration to u…
Browse files Browse the repository at this point in the history
…pgrade
  • Loading branch information
weilai-irl committed Apr 7, 2022
1 parent d38dbda commit fe70c1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions local/o365/classes/feature/sds/task/sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ public static function clean_up_sds_sync_records() {
$sectionsinenabledschools = [];
$sectionsinenabledschoolids = [];
$apiclient = \local_o365\feature\sds\utils::get_apiclient();
if (!$apiclient) {
return;
}
foreach ($enabledschools as $schoolobjectid) {
try {
$schoolclassresults = $apiclient->get_school_classes($schoolobjectid);
Expand Down

0 comments on commit fe70c1c

Please sign in to comment.