Fix bug dict has no attribute of fieldname

This commit is contained in:
SDLyu 2020-06-06 09:42:17 +08:00
parent ec3ca934f8
commit cd4ae61220

View file

@ -252,7 +252,7 @@ def get_open_count(doctype, name, items=[]):
continue
filters = get_filters_for(d)
fieldname = links.get("non_standard_fieldnames", {}).get(d, links.fieldname)
fieldname = links.get("non_standard_fieldnames", {}).get(d, links.get('fieldname'))
data = {"name": d}
if filters:
# get the fieldname for the current document