mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-23 20:16:40 +00:00
chore: remove all six compat code
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
import frappe
|
||||
from frappe.utils.dashboard import cache_source
|
||||
from six import iteritems
|
||||
|
||||
from erpnext.loan_management.report.applicant_wise_loan_security_exposure.applicant_wise_loan_security_exposure import (
|
||||
get_loan_security_details,
|
||||
@@ -53,14 +52,14 @@ def get_data(chart_name = None, chart = None, no_cache = None, filters = None, f
|
||||
GROUP BY p.loan_security
|
||||
""".format(conditions=conditions), filters, as_list=1))
|
||||
|
||||
for security, qty in iteritems(pledges):
|
||||
for security, qty in pledges.items():
|
||||
current_pledges.setdefault(security, qty)
|
||||
current_pledges[security] -= unpledges.get(security, 0.0)
|
||||
|
||||
sorted_pledges = dict(sorted(current_pledges.items(), key=lambda item: item[1], reverse=True))
|
||||
|
||||
count = 0
|
||||
for security, qty in iteritems(sorted_pledges):
|
||||
for security, qty in sorted_pledges.items():
|
||||
values.append(qty * loan_security_details.get(security, {}).get('latest_price', 0))
|
||||
labels.append(security)
|
||||
count +=1
|
||||
|
||||
Reference in New Issue
Block a user