merge changes from stable

This commit is contained in:
Rushabh Mehta 2011-07-22 17:46:52 +05:30
commit ccbb17684b
2 changed files with 3 additions and 3 deletions

View file

@ -280,12 +280,12 @@ def get_property(dt, property):
prop = webnotes.conn.sql("""
select value
from `tabProperty Setter`
where doc_type=%s and doc_name=%s and property=%s""", (dt, dt, property), as_dict=1):
where doc_type=%s and doc_name=%s and property=%s""", (dt, dt, property))
if prop:
return prop[0][0]
else:
return webnotes.conn.get_value('DocType', dt, property)
def get(dt):
"""
Load "DocType" - called by form builder, report buider and from code.py (when there is no cache)

View file

@ -207,7 +207,7 @@ class TagCounter:
def get_top_field_tags(dt):
from webnotes.model.doctype import get_property
tf = get_property(dt, 'tag_fields')
if not tf: return []
# restrict to only 2 fields