소스 검색

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()