Skip to content

Commit 7e56366

Browse files
committed
Fix error from d9775d0: cannot import GEDCOM files
1 parent 10a0adc commit 7e56366

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Services/TreeService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ public function importGedcomFile(Tree $tree, StreamInterface $stream, string $fi
219219
'imported' => 0,
220220
]);
221221

222+
DB::table('gedcom_chunk')->where('gedcom_id', '=', $tree->id())->delete();
223+
222224
$stream = $stream->detach();
223225

224226
// Convert to UTF-8.
@@ -279,7 +281,6 @@ public function delete(Tree $tree): void
279281
DB::table('module_privacy')->where('gedcom_id', '=', $tree->id())->delete();
280282
DB::table('hit_counter')->where('gedcom_id', '=', $tree->id())->delete();
281283
DB::table('default_resn')->where('gedcom_id', '=', $tree->id())->delete();
282-
DB::table('gedcom_chunk')->where('gedcom_id', '=', $tree->id())->delete();
283284
DB::table('log')->where('gedcom_id', '=', $tree->id())->delete();
284285
DB::table('gedcom')->where('gedcom_id', '=', $tree->id())->delete();
285286
}

0 commit comments

Comments
 (0)