Skip to content
Snippets Groups Projects
Unverified Commit ad9bff2c authored by Christoph Wurst's avatar Christoph Wurst Committed by GitHub
Browse files

Merge pull request #3649 from nextcloud/enh/do_not_train_provisioned

Do not try to run the training job for provisioned accounts
parents bf89e902 4047393c
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,12 @@ class TrainImportanceClassifierJob extends TimedJob {
return;
}
$dbAccount = $account->getMailAccount();
if ($dbAccount->getProvisioned() && $dbAccount->getInboundPassword() === null) {
$this->logger->info("Ignoring cron training for provisioned account that has no password set yet");
return;
}
try {
$this->classifier->train(
$account,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment