fix: [internal] Do not try to fetch empty job

pull/6626/head
Jakub Onderka 2020-11-19 19:16:12 +01:00
parent bc6f1f3550
commit 3b791aea7e
1 changed files with 7 additions and 3 deletions

View File

@ -1976,9 +1976,13 @@ class AppModel extends Model
}
$db_version = $db_version[0];
$updates = $this->__findUpgrades($db_version['AdminSetting']['value']);
$job = $this->Job->find('first', array(
'conditions' => array('Job.id' => $processId)
));
if ($processId) {
$job = $this->Job->find('first', array(
'conditions' => array('Job.id' => $processId)
));
} else {
$job = null;
}
if (!empty($updates)) {
// Exit if updates are locked.
// This is not as reliable as a real lock implementation