Skip to content

Commit

Permalink
fix: activating ingest service properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ferishili committed Nov 16, 2023
1 parent b6f58fa commit f4a44a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/API/OpencastAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public function rest(): \OpencastApi\Rest\OcRestClient
*/
public function activateIngest(bool $activate): void
{
if ($activate === true && !property_exists($this->api, 'ingest')) {
if ($activate === true && $this->api->ingest->object === null) {
$this->api = $this->decorateApiServicesForXoct($activate);
} elseif ($activate === false && property_exists($this->api, 'ingest')) {
} elseif ($activate === false && $this->api->ingest->object !== null) {
$this->api = $this->decorateApiServicesForXoct($activate);
}
}
Expand Down

0 comments on commit f4a44a9

Please sign in to comment.