瀏覽代碼

fix update member - checkIsItaly

ferrari 4 月之前
父節點
當前提交
80381b4391
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      app/Http/Livewire/Member.php

+ 5 - 2
app/Http/Livewire/Member.php

@@ -586,8 +586,11 @@ class Member extends Component
 
     public function checkIsItaly()
     {
-        $n = \App\Models\Nation::findOrFail($this->nation_id);
-        $this->isItaly = $n->is_italy;
+        if ($this->nation_id > 0) {
+            $n = \App\Models\Nation::findOrFail($this->nation_id);
+            $this->isItaly = $n->is_italy;
+        } else
+            $this->isItaly = false;
     }
 
     public function checkIsBirthItaly()