fix: Reset contact attributes when form is updated (#10539)

This commit is contained in:
Sivin Varghese
2024-12-05 10:55:28 +05:30
committed by GitHub
parent 3edc0542cc
commit f7b0d5dbe2

View File

@@ -68,7 +68,8 @@ const handleFormUpdate = updatedData => {
const updateContact = async () => {
try {
await store.dispatch('contacts/update', contactData.value);
const { customAttributes, ...basicContactData } = contactData.value;
await store.dispatch('contacts/update', basicContactData);
useAlert(t('CONTACTS_LAYOUT.CARD.EDIT_DETAILS_FORM.SUCCESS_MESSAGE'));
} catch (error) {
useAlert(t('CONTACTS_LAYOUT.CARD.EDIT_DETAILS_FORM.ERROR_MESSAGE'));