mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #1979
This commit is contained in:
parent
bbd68e78c1
commit
fa4959fc6a
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user