mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Fix an issue where new users would be given a rule that always triggers.
This commit is contained in:
@@ -31,6 +31,7 @@ use FireflyIII\TransactionRules\Actions\ActionInterface;
|
||||
use FireflyIII\TransactionRules\Factory\ActionFactory;
|
||||
use FireflyIII\TransactionRules\Factory\TriggerFactory;
|
||||
use FireflyIII\TransactionRules\Triggers\AbstractTrigger;
|
||||
use FireflyIII\TransactionRules\Triggers\UserAction;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
@@ -279,11 +280,14 @@ final class Processor
|
||||
Log::debug('Is a match!');
|
||||
++$hitTriggers;
|
||||
// is non-strict? then return true!
|
||||
if (!$this->strict) {
|
||||
if (!$this->strict && UserAction::class !== \get_class($trigger)) {
|
||||
Log::debug('Rule is set as non-strict, return true!');
|
||||
|
||||
return true;
|
||||
}
|
||||
if (!$this->strict && UserAction::class === \get_class($trigger)) {
|
||||
Log::debug('Rule is set as non-strict, but action was "user-action". Will not return true.');
|
||||
}
|
||||
}
|
||||
if ($trigger->stopProcessing) {
|
||||
Log::debug('Stop processing this trigger and break.');
|
||||
|
Reference in New Issue
Block a user