igb преди 4 месеца
родител
ревизия
d739b8a1fc
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      app/Services/TemplateUpdater.php

+ 5 - 0
app/Services/TemplateUpdater.php

@@ -5,6 +5,7 @@ namespace App\Services;
 use App\Models\DistAppearancePublishList;
 use App\Models\DistAppearanceTemplate;
 use Illuminate\Support\Facades\Storage;
+use function PHPUnit\Framework\isEmpty;
 
 class TemplateUpdater
 {
@@ -41,6 +42,10 @@ class TemplateUpdater
             ->first();
 
 
+
+        if (!$publishList) {
+            return "No publishList templates found in dist_appearance_template for dist_id: $dist?->id, appearance_id: $dist?->appearance_id.";
+        }
         // 获取 template_update_code
         $updateCode = $publishList->template_update_code;