Browse Source

[fix] query report share condition that caused Permitted Documents For User report to fail when User Permissions are applied

version-14
Anand Doshi 10 years ago
parent
commit
d6ad8c49d4
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      frappe/desk/query_report.py

+ 2
- 1
frappe/desk/query_report.py View File

@@ -152,7 +152,8 @@ def get_filtered_data(ref_doctype, columns, data):


if match_filters_per_doctype: if match_filters_per_doctype:
for row in data: for row in data:
if shared and row[linked_doctypes[ref_doctype]] in shared:
# Why linked_doctypes.get(ref_doctype)? because if column is empty, linked_doctypes[ref_doctype] is removed
if linked_doctypes.get(ref_doctype) and shared and row[linked_doctypes[ref_doctype]] in shared:
result.append(row) result.append(row)


elif has_match(row, linked_doctypes, match_filters_per_doctype, ref_doctype, if_owner, columns_dict): elif has_match(row, linked_doctypes, match_filters_per_doctype, ref_doctype, if_owner, columns_dict):


Loading…
Cancel
Save