Skip to content

Commit 28ed127

Browse files
Merge pull request #2072 from amit-webkul/translation
Fixed Issue #2060
2 parents 65fa3a5 + e11ccaf commit 28ed127

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/Webkul/Contact/src/Repositories/PersonRepository.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,9 @@ public function create(array $data)
7474
*/
7575
public function update(array $data, $id, $attributes = [])
7676
{
77-
$data['user_id'] = $data['user_id'] ?? null;
77+
$data['user_id'] = empty($data['user_id']) ? null : $data['user_id'];
7878

79-
$person = $this->find($id);
80-
81-
$data['organization_id'] = $data['organization_id'] ?? $person->organization_id;
82-
83-
$person->update($data);
79+
$person = parent::update($data, $id);
8480

8581
/**
8682
* If attributes are provided then only save the provided attributes and return.

0 commit comments

Comments
 (0)