mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Don't try to migrate nonexistent accounts
This commit is contained in:
parent
eb91a3cd42
commit
b5b3fa56ac
@ -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();
|
$primaryAccount = $otherAccounts->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($primaryAccount)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$company = Company::create();
|
$company = Company::create();
|
||||||
if ($primaryAccount->pro_plan_paid && $primaryAccount->pro_plan_paid != '0000-00-00') {
|
if ($primaryAccount->pro_plan_paid && $primaryAccount->pro_plan_paid != '0000-00-00') {
|
||||||
$company->plan = 'pro';
|
$company->plan = 'pro';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user