Fix: some Company functions throw when seeding the DB

This commit is contained in:
Abdullah Alansari
2015-11-19 09:44:06 +03:00
parent e91a22fce0
commit e82ede5d44

View File

@@ -11,7 +11,8 @@ final class Company extends Elegant
{
$settings = Setting::getSettings();
if (is_null($settings)) { return TRUE; }
// NOTE: this can happen when seeding the database
if (is_null($settings)) { return FALSE; }
else { return $settings->full_multiple_companies_support == 1; }
}