mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 09:43:16 +00:00
Update StatusTagsPipeline, fix object tags slug query
This commit is contained in:
parent
bf5b72f082
commit
9989d6c66f
1 changed files with 9 additions and 8 deletions
|
@ -82,13 +82,14 @@ class StatusTagsPipeline implements ShouldQueue
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if(!$hashtag) {
|
if(!$hashtag) {
|
||||||
$hashtag = new Hashtag;
|
$hashtag = Hashtag::updateOrCreate([
|
||||||
$hashtag->name = $name;
|
'slug' => str_slug($name, '-', false),
|
||||||
$hashtag->slug = str_slug($name, '-', false);
|
],[
|
||||||
$hashtag->save();
|
'name' => $name
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$hashtag = Hashtag::firstOrCreate([
|
$hashtag = Hashtag::updateOrCreate([
|
||||||
'slug' => str_slug($name, '-', false),
|
'slug' => str_slug($name, '-', false),
|
||||||
],[
|
],[
|
||||||
'name' => $name
|
'name' => $name
|
||||||
|
|
Loading…
Reference in a new issue