We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 65fa3a5 + e11ccaf commit 28ed127Copy full SHA for 28ed127
packages/Webkul/Contact/src/Repositories/PersonRepository.php
@@ -74,13 +74,9 @@ public function create(array $data)
74
*/
75
public function update(array $data, $id, $attributes = [])
76
{
77
- $data['user_id'] = $data['user_id'] ?? null;
+ $data['user_id'] = empty($data['user_id']) ? null : $data['user_id'];
78
79
- $person = $this->find($id);
80
-
81
- $data['organization_id'] = $data['organization_id'] ?? $person->organization_id;
82
83
- $person->update($data);
+ $person = parent::update($data, $id);
84
85
/**
86
* If attributes are provided then only save the provided attributes and return.
0 commit comments