浏览代码

[fix] domain.remove_domain

version-14
Rushabh Mehta 7 年前
父节点
当前提交
9fd552d3f2
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      frappe/core/doctype/domain/domain.py

+ 3
- 3
frappe/core/doctype/domain/domain.py 查看文件

@@ -49,10 +49,10 @@ class Domain(Document):
custom_fields = [custom_fields]

for custom_field_detail in custom_fields:
custom_field = frappe.get_doc('Custom Field',
custom_field_name = frappe.db.get_value('Custom Field',
dict(dt=doctype, fieldname=custom_field_detail.get('fieldname')))
custom_field.delete()
if custom_field_name:
frappe.delete_doc('Custom Field', custom_field_name)

def setup_roles(self):
'''Enable roles that are restricted to this domain'''


正在加载...
取消
保存