瀏覽代碼

[hot-fix] custom field for single

version-14
Rushabh Mehta 9 年之前
父節點
當前提交
017e985f20
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. +5
    -4
      frappe/custom/doctype/custom_field/custom_field.py

+ 5
- 4
frappe/custom/doctype/custom_field/custom_field.py 查看文件

@@ -46,10 +46,11 @@ class CustomField(Document):
validate_fields_for_doctype(self.dt)

# update the schema
if (self.fieldname not in frappe.db.get_table_columns(self.dt)
or getattr(self, "_old_fieldtype", None) != self.fieldtype):
from frappe.model.db_schema import updatedb
updatedb(self.dt)
if not frappe.db.get_value('DocType', self.dt, 'issingle'):
if (self.fieldname not in frappe.db.get_table_columns(self.dt)
or getattr(self, "_old_fieldtype", None) != self.fieldtype):
from frappe.model.db_schema import updatedb
updatedb(self.dt)

def on_trash(self):
# delete property setter entries


Loading…
取消
儲存