mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #4669 from pixelfed/staging
Update StatusTagsPipeline, fix object tags slug query
This commit is contained in:
commit
dcc6f65e33
|
@ -82,13 +82,14 @@ class StatusTagsPipeline implements ShouldQueue
|
|||
->first();
|
||||
|
||||
if(!$hashtag) {
|
||||
$hashtag = new Hashtag;
|
||||
$hashtag->name = $name;
|
||||
$hashtag->slug = str_slug($name, '-', false);
|
||||
$hashtag->save();
|
||||
$hashtag = Hashtag::updateOrCreate([
|
||||
'slug' => str_slug($name, '-', false),
|
||||
],[
|
||||
'name' => $name
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
$hashtag = Hashtag::firstOrCreate([
|
||||
$hashtag = Hashtag::updateOrCreate([
|
||||
'slug' => str_slug($name, '-', false),
|
||||
],[
|
||||
'name' => $name
|
||||
|
|
Loading…
Reference in New Issue