mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixes the tests.
This commit is contained in:
@@ -10,7 +10,6 @@ class BaseController extends Controller
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct();
|
|
||||||
Event::fire('limits.check');
|
Event::fire('limits.check');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@@ -19,10 +19,14 @@ class EloquentLimitTrigger
|
|||||||
*/
|
*/
|
||||||
public function checkRepeatingLimits()
|
public function checkRepeatingLimits()
|
||||||
{
|
{
|
||||||
$limits = \Limit::leftJoin('components', 'components.id', '=', 'limits.component_id')
|
if (\Auth::check()) {
|
||||||
->where('components.user_id', \Auth::user()->id)
|
$limits = \Limit::leftJoin('components', 'components.id', '=', 'limits.component_id')
|
||||||
->where('limits.repeats', 1)
|
->where('components.user_id', \Auth::user()->id)
|
||||||
->get(['limits.*']);
|
->where('limits.repeats', 1)
|
||||||
|
->get(['limits.*']);
|
||||||
|
} else {
|
||||||
|
$limits = [];
|
||||||
|
}
|
||||||
|
|
||||||
/** @var \Limit $limit */
|
/** @var \Limit $limit */
|
||||||
foreach ($limits as $limit) {
|
foreach ($limits as $limit) {
|
||||||
|
Reference in New Issue
Block a user