1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Don't try to migrate nonexistent accounts

This commit is contained in:
Joshua Dwire 2016-04-20 09:50:13 -04:00
parent eb91a3cd42
commit b5b3fa56ac

View File

@ -87,6 +87,10 @@ LEFT JOIN users u5 ON (u5.public_id IS NULL OR u5.public_id = 0) AND user_accoun
$primaryAccount = $otherAccounts->first();
}
if (empty($primaryAccount)) {
return;
}
$company = Company::create();
if ($primaryAccount->pro_plan_paid && $primaryAccount->pro_plan_paid != '0000-00-00') {
$company->plan = 'pro';