mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update FixHashtags command
This commit is contained in:
parent
9d0720e295
commit
cec1c118d5
1 changed files with 2 additions and 2 deletions
|
@ -56,13 +56,13 @@ class FixHashtags extends Command
|
|||
$this->info('Running Fix Hashtags command');
|
||||
$this->info(' ');
|
||||
|
||||
$missingCount = StatusHashtag::doesntHave('status')->count();
|
||||
$missingCount = StatusHashtag::doesntHave('profile')->doesntHave('status')->count();
|
||||
if($missingCount > 0) {
|
||||
$this->info("Found {$missingCount} orphaned StatusHashtag records to delete ...");
|
||||
$this->info(' ');
|
||||
$bar = $this->output->createProgressBar($missingCount);
|
||||
$bar->start();
|
||||
foreach(StatusHashtag::doesntHave('status')->get() as $tag) {
|
||||
foreach(StatusHashtag::doesntHave('profile')->doesntHave('status')->get() as $tag) {
|
||||
$tag->delete();
|
||||
$bar->advance();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue