Do not complain when the category is already set.

This commit is contained in:
James Cole 2024-02-14 19:34:36 +01:00
parent 1b1712d998
commit ac17b82d85
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -89,7 +89,7 @@ class SetCategory implements ActionInterface
$oldCategory = $object->categories()->first();
$oldCategoryName = $oldCategory?->name;
if ((int)$oldCategory?->id === $category->id) {
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.already_linked_to_category', ['name' => $category->name])));
//event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.already_linked_to_category', ['name' => $category->name])));
return false;
}