Accompanying course: can edit requestor in case no address

This commit is contained in:
nobohan 2022-02-14 16:47:35 +01:00
parent d5c1591205
commit 2fcd7a21a4

View File

@ -287,7 +287,9 @@ export default {
body.name = payload.data.text;
body.email = payload.data.email;
body.telephone = payload.data.phonenumber;
body.address = { id: payload.data.address.address_id };
if (payload.data.address) {
body.address = { id: payload.data.address.address_id };
}
makeFetch('PATCH', `/api/1.0/thirdparty/thirdparty/${payload.data.id}.json`, body)
.then(response => {