Kaynağa Gözat

Merge pull request #8590 from sahil28297/fix_create_contact

fix(patch): check if contact already exists for user
version-14
mergify[bot] 5 yıl önce
committed by GitHub
ebeveyn
işleme
849bbe1ca0
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. +2
    -0
      frappe/patches/v11_0/create_contact_for_user.py

+ 2
- 0
frappe/patches/v11_0/create_contact_for_user.py Dosyayı Görüntüle

@@ -17,6 +17,8 @@ def execute():

users = frappe.get_all('User', filters={"name": ('not in', 'Administrator, Guest')}, fields=["*"])
for user in users:
if frappe.db.exists("Contact", {"email_id": user.email}) or frappe.db.exists("Contact Email", {"email_id": user.email}):
continue
if user.first_name:
user.first_name = re.sub("[<>]+", '', frappe.safe_decode(user.first_name))
if user.last_name:


Yükleniyor…
İptal
Kaydet