safe encode non ascii characters (#15755)
This commit is contained in:
parent
a89bce0b6e
commit
16d45c8e2e
@ -379,8 +379,8 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
if filters:
|
||||
if filters.get("project"):
|
||||
if not isinstance(filters.get("project"), list):
|
||||
projects = str(filters.get("project")).strip()
|
||||
filters.project = [d.strip() for d in projects.split(',') if d]
|
||||
projects = frappe.safe_encode(filters.get("project"))
|
||||
filters.project = [d.strip() for d in projects.strip().split(',') if d]
|
||||
additional_conditions.append("project in %(project)s")
|
||||
|
||||
if filters.get("cost_center"):
|
||||
@ -400,7 +400,8 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
|
||||
def get_cost_centers_with_children(cost_centers):
|
||||
if not isinstance(cost_centers, list):
|
||||
cost_centers = [d.strip() for d in str(cost_centers).strip().split(',') if d]
|
||||
cost_centers = frappe.safe_encode(cost_centers)
|
||||
cost_centers = [d.strip() for d in cost_centers.strip().split(',') if d]
|
||||
|
||||
all_cost_centers = []
|
||||
for d in cost_centers:
|
||||
|
Loading…
x
Reference in New Issue
Block a user