Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure we don't confuse groups and rules #677

Merged
merged 1 commit into from
Apr 19, 2024
Merged

ensure we don't confuse groups and rules #677

merged 1 commit into from
Apr 19, 2024

Conversation

recursivetree
Copy link
Contributor

Crypta's fix didn't handle the case where you have groups and rules in the root group

@recursivetree
Copy link
Contributor Author

This was causing the following crash:

[2024-04-18 19:01:19] local.ERROR: Undefined property: stdClass::$name {"exception":"[object] (ErrorException(code: 0): Undefined property: stdClass::$name at /var/www/seat/vendor/eveseat/web/src/Models/Filterable.php:119)
[stacktrace]
#0 /var/www/seat/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 /var/www/seat/vendor/eveseat/web/src/Models/Filterable.php(119): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
#2 /var/www/seat/vendor/eveseat/web/src/Models/Filterable.php(68): Seat\\Web\\Models\\Squads\\Squad->applyGroup()
#3 /var/www/seat/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(298): Seat\\Web\\Models\\Squads\\Squad->Seat\\Web\\Models\\{closure}()
#4 /var/www/seat/vendor/eveseat/web/src/Models/QueryGroupBuilder.php(78): Illuminate\\Database\\Eloquent\\Builder->where()
#5 /var/www/seat/vendor/eveseat/web/src/Models/Filterable.php(67): Seat\\Web\\Models\\QueryGroupBuilder->where()
#6 /var/www/seat/vendor/eveseat/web/src/Models/Squads/Squad.php(99): Seat\\Web\\Models\\Squads\\Squad->isEligible()
#7 /var/www/seat/vendor/eveseat/web/src/Observers/AbstractSquadObserver.php(68): Seat\\Web\\Models\\Squads\\Squad->isUserEligible()
#8 /var/www/seat/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(240): Seat\\Web\\Observers\\AbstractSquadObserver->Seat\\Web\\Observers\\{closure}()
#9 /var/www/seat/vendor/eveseat/web/src/Observers/AbstractSquadObserver.php(67): Illuminate\\Support\\Collection->each()
#10 /var/www/seat/vendor/eveseat/web/src/Observers/CharacterAssetObserver.php(41): Seat\\Web\\Observers\\AbstractSquadObserver->updateUserSquads()
#11 /var/www/seat/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(478): Seat\\Web\\Observers\\CharacterAssetObserver->created()
#12 /var/www/seat/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(286): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#13 /var/www/seat/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(266): Illuminate\\Events\\Dispatcher->invokeListeners()
#14 /var/www/seat/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(215): Illuminate\\Events\\Dispatcher->dispatch()
#15 /var/www/seat/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1319): Illuminate\\Database\\Eloquent\\Model->fireModelEvent()
#16 /var/www/seat/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1137): Illuminate\\Database\\Eloquent\\Model->performInsert()
#17 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Assets/Character/Assets.php(116): Illuminate\\Database\\Eloquent\\Model->save()
#18 /var/www/seat/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(240): Seat\\Eveapi\\Jobs\\Assets\\Character\\Assets->Seat\\Eveapi\\Jobs\\Assets\\Character\\{closure}()
#19 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Assets/Character/Assets.php(101): Illuminate\\Support\\Collection->each()
#20 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Seat\\Eveapi\\Jobs\\Assets\\Character\\Assets->handle()
#21 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#22 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#23 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#24 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#25 /var/www/seat/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
#26 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#27 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#28 /var/www/seat/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
#29 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Bus\\Dispatcher->dispatchNow()
#30 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#31 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Middleware/WithoutOverlapping.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Queue\\Middleware\\WithoutOverlapping->handle()
#33 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Middleware/CheckTokenVersion.php(54): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#34 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckTokenVersion->handle()
#35 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Middleware/CheckTokenScope.php(82): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckTokenScope->handle()
#37 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Middleware/CheckEsiRouteStatus.php(80): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckEsiRouteStatus->handle()
#39 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Middleware/CheckServerStatus.php(55): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#40 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckServerStatus->handle()
#41 /var/www/seat/vendor/eveseat/eveapi/src/Jobs/Middleware/CheckEsiRateLimit.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#42 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckEsiRateLimit->handle()
#43 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#44 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\\Pipeline\\Pipeline->then()
#45 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#46 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call()
#47 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\\Queue\\Jobs\\Job->fire()
#48 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\\Queue\\Worker->process()
#49 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(176): Illuminate\\Queue\\Worker->runJob()
#50 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(137): Illuminate\\Queue\\Worker->daemon()
#51 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(120): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#52 /var/www/seat/vendor/laravel/horizon/src/Console/WorkCommand.php(51): Illuminate\\Queue\\Console\\WorkCommand->handle()
#53 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\\Horizon\\Console\\WorkCommand->handle()
#54 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#55 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#56 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#57 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#58 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#59 /var/www/seat/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#60 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#61 /var/www/seat/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
#62 /var/www/seat/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
#63 /var/www/seat/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#64 /var/www/seat/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#65 /var/www/seat/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#66 {main}
"} 

@Crypta-Eve Crypta-Eve merged commit 985ac64 into eveseat:5.0.x Apr 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants