Merge pull request #771 from shariquerik/contact-not-loading

This commit is contained in:
Shariq Ansari 2025-04-22 13:11:42 +05:30 committed by GitHub
commit 001a6617f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View File

@ -30,15 +30,7 @@ def get_contact(name):
if not len(contact):
frappe.throw(_("Contact not found"), frappe.DoesNotExistError)
contact = contact.pop()
contact["doctype"] = "Contact"
contact["email_ids"] = frappe.get_all(
"Contact Email", filters={"parent": name}, fields=["name", "email_id", "is_primary"]
)
contact["phone_nos"] = frappe.get_all(
"Contact Phone", filters={"parent": name}, fields=["name", "phone", "is_primary_mobile_no"]
)
return contact

View File

@ -168,7 +168,11 @@
</template>
</Tabs>
</div>
<ErrorPage v-else :errorTitle="errorTitle" :errorMessage="errorMessage" />
<ErrorPage
v-else-if="errorTitle"
:errorTitle="errorTitle"
:errorMessage="errorMessage"
/>
<AddressModal v-model="showAddressModal" v-model:address="_address" />
</template>

View File

@ -160,7 +160,11 @@
</template>
</Tabs>
</div>
<ErrorPage v-else :errorTitle="errorTitle" :errorMessage="errorMessage" />
<ErrorPage
v-else-if="errorTitle"
:errorTitle="errorTitle"
:errorMessage="errorMessage"
/>
<QuickEntryModal
v-if="showQuickEntryModal"
v-model="showQuickEntryModal"