Commit 3b9a1619 authored by Roman Ondráček's avatar Roman Ondráček

Config: fix uncatched exception in scheduler task editor

Signed-off-by: Roman Ondráček's avatarRoman Ondráček <ondracek.roman@centrum.cz>
parent f17a5442
Pipeline #2319 passed with stages
in 39 minutes and 42 seconds
......@@ -256,7 +256,9 @@ class SchedulerFormFactory {
}
$this->presenter->redirect('Scheduler:default');
} catch (NonExistingJsonSchemaException $e) {
$this->presenter->flashError('config.messages.writeFailures.nonExistingJsonSchema');
$this->presenter->flashError($e->getMessage());
} catch (InvalidJsonException $e) {
$this->presenter->flashError($e->getMessage());
} catch (IOException $e) {
$this->presenter->flashError('config.messages.writeFailures.ioError');
} catch (JsonException $e) {
......
......@@ -254,6 +254,9 @@ class SchedulerManager {
}
}
$this->timeManager->cronToArray($config);
if (!isset($config->timeSpec->period)) {
$config->timeSpec->period = 0;
}
$this->schemaManager->validate($config);
$this->fileManager->write($this->fileName, $config);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment