fix 500: in edit context, we don't need to postAddressTo a second time !

This commit is contained in:
Mathieu Jaumotte 2021-08-08 11:38:34 +02:00
parent 44313b507a
commit 72cd9f452e

View File

@ -539,6 +539,7 @@ export default {
postAddressTo(payload, postTo)
{
console.log('postAddressTo', postTo);
if (!this.context.edit) {
switch (postTo) {
case 'household':
postAddressToHousehold(payload.entityId, payload.addressId)
@ -581,6 +582,12 @@ export default {
})
;
}
} else {
// address is already posted, just finish !
if (this.options.redirectToBackUrl) {
window.location.assign(payload.backUrl);
}
}
},
}