Skip to content

Commit

Permalink
Merge pull request #1 from red-freak/develop
Browse files Browse the repository at this point in the history
FIX: the truncating of paraphrases is not done multiple times by each…
  • Loading branch information
red-freak authored Nov 5, 2022
2 parents 46b5b69 + b37804a commit 1e0b289
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Console/Commands/ImportHtmlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public function handle()
exit(Command::FAILURE);
}

Paraphrase::truncate();
$this->warn('All paraphrases deleted.');

$files = File::glob(storage_path('sources/*.html'));

foreach($files as $file) {
Expand Down Expand Up @@ -120,9 +123,6 @@ private function createEditors(array $contentRows): Collection
*/
private function createParaphrases(array $contentRows, Collection $editors): void
{
Paraphrase::truncate();
$this->warn('All paraphrases deleted.');

$rows = count(data_get($contentRows, 'editor', []));
$this->info('Creating new paraphrases');
$bar = new ProgressBar($this->output, $rows);
Expand Down

0 comments on commit 1e0b289

Please sign in to comment.