From cec1c118d545f73e8f6d23e50011cde538915fb3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 8 Jul 2019 00:20:32 -0600 Subject: [PATCH] Update FixHashtags command --- app/Console/Commands/FixHashtags.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/FixHashtags.php b/app/Console/Commands/FixHashtags.php index 3b51bb407..dd292e6f5 100644 --- a/app/Console/Commands/FixHashtags.php +++ b/app/Console/Commands/FixHashtags.php @@ -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(); }