Sfoglia il codice sorgente

chore: Drop unreachable code

version-14
Gavin D'souza 4 anni fa
parent
commit
bd6fcddd04
2 ha cambiato i file con 2 aggiunte e 5 eliminazioni
  1. +1
    -4
      frappe/contacts/doctype/address/address.py
  2. +1
    -1
      frappe/utils/__init__.py

+ 1
- 4
frappe/contacts/doctype/address/address.py Vedi File

@@ -171,14 +171,11 @@ def get_address_list(doctype, txt, filters, limit_start, limit_page_length = 20,
def has_website_permission(doc, ptype, user, verbose=False):
"""Returns true if there is a related lead or contact related to this document"""
contact_name = frappe.db.get_value("Contact", {"email_id": frappe.session.user})

if contact_name:
contact = frappe.get_doc('Contact', contact_name)
return contact.has_common_link(doc)

lead_name = frappe.db.get_value("Lead", {"email_id": frappe.session.user})
if lead_name:
return doc.has_link('Lead', lead_name)

return False

def get_address_templates(address):


+ 1
- 1
frappe/utils/__init__.py Vedi File

@@ -371,7 +371,7 @@ def get_path(*path, **kwargs):
base = frappe.local.site_path
return os.path.join(base, *path)

def get_site_base_path(sites_dir=None, hostname=None):
def get_site_base_path():
return frappe.local.site_path

def get_site_path(*path):


Caricamento…
Annulla
Salva