Bläddra i källkod

Merge commit '95de543da33f7ec99f2e6e7801879353c9aa99b3' into dev

waymen 4 månader sedan
förälder
incheckning
960addbf1f
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      app/Http/Controllers/API/FileController.php

+ 2 - 1
app/Http/Controllers/API/FileController.php

@@ -86,6 +86,7 @@ class FileController extends Controller
             ->where('title', $file->title)
             ->where('object_type', $file->object_type)
             ->where("object_id", $file->object_id)
+            ->where("folder_id", $file->folder_id)
             ->get();
 
         File::query()->whereIn("id", $files->pluck("id")->toArray())->delete();
@@ -314,7 +315,7 @@ class FileController extends Controller
         $folderId = (int) ($inputArr['folder_id'] ?? 0);
         $pageSize = (int) $request->get('page_size', 10);
         $modelTypeArr = $inputArr['model_type'] ?? [];
-        
+
         if (empty($modelTypeArr)) {
             $modelTypeArr = [BimFileModelType::BIM->value, BimFileModelType::CAD->value];
         }