Skip to content

Commit

Permalink
Post Merger: staff updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Jul 12, 2024
1 parent 286e054 commit e34a2de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private function requestNewToken(): string
'grant_type' => 'client_credentials',
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
'scope' => 'api',
// 'scope' => 'api', // POST MERGER SEEMINGLY TAKE THIS OUT
],
]);

Expand Down
9 changes: 9 additions & 0 deletions src/Wrappers/Employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ protected function handle(): void
}
}
}
/**
* Now we use just one ISAMS we need to rely on divisions to work out what school a staff member is in.
* NB: Isams makes 'divisions' null if empty, but our code in Pastoral Module expects an empty collection.
*/
if (isset($this->divisions)) {
$this->divisions = collect($this->divisions);
} else {
$this->divisions = collect();
}

if (isset($this->customFields)) {
$this->customFields = collect($this->customFields);
Expand Down

0 comments on commit e34a2de

Please # to comment.