Update FixHashtags command

pull/1480/head
Daniel Supernault 2019-07-08 00:20:32 -06:00
rodzic 9d0720e295
commit cec1c118d5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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();
}