mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-09-03 20:52:58 -05:00
Fix #1979
This commit is contained in:
@@ -63,7 +63,7 @@ class TagFactory
|
|||||||
return Tag::create(
|
return Tag::create(
|
||||||
[
|
[
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'tag' => $data['tag'],
|
'tag' => trim($data['tag']),
|
||||||
'tagMode' => 'nothing',
|
'tagMode' => 'nothing',
|
||||||
'date' => $data['date'],
|
'date' => $data['date'],
|
||||||
'description' => $data['description'],
|
'description' => $data['description'],
|
||||||
@@ -81,6 +81,7 @@ class TagFactory
|
|||||||
*/
|
*/
|
||||||
public function findOrCreate(string $tag): ?Tag
|
public function findOrCreate(string $tag): ?Tag
|
||||||
{
|
{
|
||||||
|
$tag = trim($tag);
|
||||||
if (null === $this->tags) {
|
if (null === $this->tags) {
|
||||||
$this->tags = $this->user->tags()->get();
|
$this->tags = $this->user->tags()->get();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user