Fixed: replace kontoverbindung when updating

This commit is contained in:
philipp lang 2022-02-11 01:55:30 +01:00
parent b833537f32
commit 1f03a84eff
1 changed files with 3 additions and 1 deletions

View File

@ -127,9 +127,11 @@ class Api {
$member = Member::fromAttributes($attributes);
$existing = $this->member($member->group_id, $member->id);
if (data_get($attributes, 'id')) {
$payload = array_merge($existing, $member->toNami());
$payload['kontoverbindung'] = json_encode($payload['kontoverbindung']);
$response = $this->http()->put(
self::$url.'/ica/rest/nami/mitglied/filtered-for-navigation/gruppierung/gruppierung/'.$member->group_id.'/'.$member->id,
array_merge($existing, $member->toNami())
$payload
);
if (data_get($response->json(), 'success') !== true) {
$this->exception('Update failed', $member->toNami(), $response->json());