mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for setup page flow
This commit is contained in:
parent
fe3242a095
commit
dea5543c06
@ -15,15 +15,16 @@ use Exception;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException;
|
||||
use Illuminate\Database\Eloquent\RelationNotFoundException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Http\Exceptions\ThrottleRequestsException;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Sentry\State\Scope;
|
||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Illuminate\Database\Eloquent\RelationNotFoundException;
|
||||
use Sentry\State\Scope;
|
||||
use function Sentry\configureScope;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
@ -55,9 +56,12 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
{
|
||||
if(!Schema::hasTable('accounts'))
|
||||
return;
|
||||
|
||||
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
||||
app('sentry')->configureScope(function (Scope $scope): void {
|
||||
if (auth()->guard('contact')->user() && auth()->guard('contact')->user()->company->account->report_errors) {
|
||||
if (auth()->guard('contact') && auth()->guard('contact')->user() && auth()->guard('contact')->user()->company->account->report_errors) {
|
||||
$scope->setUser([
|
||||
'id' => auth()->guard('contact')->user()->company->account->key,
|
||||
'email' => "anonymous@example.com",
|
||||
|
@ -23,6 +23,7 @@ use App\Utils\Traits\AppSetup;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use League\Fractal\Manager;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection;
|
||||
@ -319,7 +320,7 @@ class BaseController extends Controller
|
||||
// return redirect()->secure(request()->path());
|
||||
// }
|
||||
|
||||
if ((bool)$this->checkAppSetup() !== false && $account = Account::all()->first()) {
|
||||
if ((bool)$this->checkAppSetup() !== false && Schema::hasTable('accounts') && $account = Account::all()->first()) {
|
||||
$data = [];
|
||||
|
||||
if (Ninja::isSelfHost()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user