Переглянути джерело

Merge pull request #8590 from sahil28297/fix_create_contact

fix(patch): check if contact already exists for user
version-14
mergify[bot] 5 роки тому
committed by GitHub
джерело
коміт
849bbe1ca0
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: 4AEE18F83AFDEB23
1 змінених файлів з 2 додано та 0 видалено
  1. +2
    -0
      frappe/patches/v11_0/create_contact_for_user.py

+ 2
- 0
frappe/patches/v11_0/create_contact_for_user.py Переглянути файл

@@ -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:


Завантаження…
Відмінити
Зберегти