From 4a0b08fedb848eed70f1ec2dd214b11f57504b88 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 7 Feb 2024 19:08:10 +0100 Subject: [PATCH] wait #6716 @0.5 --- src/app/Magic/Traits/CustomDataSource.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/Magic/Traits/CustomDataSource.php b/src/app/Magic/Traits/CustomDataSource.php index 6f6a13b..0a1ea90 100644 --- a/src/app/Magic/Traits/CustomDataSource.php +++ b/src/app/Magic/Traits/CustomDataSource.php @@ -42,6 +42,10 @@ trait CustomDataSource $instance = (new static); + if (method_exists($instance, 'forceDelete')) { + static::withoutGlobalScopes()->onlyTrashed()->forceDelete(); + } + $listAllInDb = static::withoutGlobalScopes()->get(); $pk = $instance->getPrimaryKey(); $existingKeys = []; -- 2.39.5