mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge pull request #43643 from Sanket322/ensure_db_before_fetch
fix: check for the existence of a doctype before querying.
This commit is contained in:
@@ -10,6 +10,8 @@ def execute():
|
|||||||
Remove Lead Source doctype and use UTM Source Instead
|
Remove Lead Source doctype and use UTM Source Instead
|
||||||
Ensure that for each Campaign, a UTM Campaign is also set
|
Ensure that for each Campaign, a UTM Campaign is also set
|
||||||
"""
|
"""
|
||||||
|
if not frappe.db.exists("DocType", "Lead Source") or not frappe.db.exists("DocType", "UTM Source"):
|
||||||
|
return
|
||||||
|
|
||||||
ls = frappe.qb.DocType("Lead Source")
|
ls = frappe.qb.DocType("Lead Source")
|
||||||
ms = frappe.qb.DocType("UTM Source")
|
ms = frappe.qb.DocType("UTM Source")
|
||||||
|
|||||||
Reference in New Issue
Block a user