peterguo 5 ngày trước cách đây
mục cha
commit
be551edcbd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Http/Resources/API/FileByObjectResource.php

+ 1 - 1
app/Http/Resources/API/FileByObjectResource.php

@@ -33,7 +33,7 @@ class FileByObjectResource extends JsonResource
             'object_type'=>$this->object_type,
             'object_id'=>$this->object_id,
             'approval_status'=>$this->approval_status,
-            'naming_rule' => new NamingRuleSimpleResource($this->namingRule),
+            'naming_rule' => $this->namingRule ? new NamingRuleSimpleResource($this->namingRule) : null,
             'naming_rules' => $this->naming_rules,
             'doc_stage' => $this->doc_stage,
             'doc_type' => $this->doc_type,