浏览代码

minor fix in get_property

version-14
Anand Doshi 12 年前
父节点
当前提交
e80c6f3cb1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      webnotes/model/doctype.py

+ 2
- 1
webnotes/model/doctype.py 查看文件

@@ -302,7 +302,8 @@ def get_property(dt, prop, fieldname=None):
"""get a doctype property"""
doctypelist = get(dt)
if fieldname:
return doctypelist.getone({"fieldname":fieldname}).fields.get(prop)
field = doctypelist.get_field(fieldname)
return field and field.fields.get(prop) or None
else:
return doctypelist[0].fields.get(prop)


正在加载...
取消
保存