Fix Create Relation to self
This commit is contained in:
@@ -141,7 +141,7 @@ class PersonController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('relation_with_owner')) {
|
if ($request->has('relation_with_owner') && auth()->user()->person_id != $family->id) {
|
||||||
$family->familyOwner()->updateOrCreate([
|
$family->familyOwner()->updateOrCreate([
|
||||||
'owner_id' => auth()->user()->person_id,
|
'owner_id' => auth()->user()->person_id,
|
||||||
'person_id' => $family->id,
|
'person_id' => $family->id,
|
||||||
|
|||||||
Reference in New Issue
Block a user