commit | b93c18bd4a0320a22fb03b9f41b92675ee246f19 | [log] [tgz] |
---|---|---|
author | Prateek <40106895+prateekkaramchandani@users.noreply.github.com> | Fri Feb 17 20:25:13 2023 +0530 |
committer | Prateek <40106895+prateekkaramchandani@users.noreply.github.com> | Fri Feb 17 20:25:13 2023 +0530 |
tree | 6e89dc92dcf03fe009859783336747c58b56aec2 | |
parent | 6b3028d77b741a54e548401d21958970b5992809 [diff] |
fix: use max function to get default company address
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 07ee289..fcdf245 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py
@@ -808,7 +808,7 @@ return existing_address if out: - return min(out, key=lambda x: x[1])[0] # find min by sort_key + return max(out, key=lambda x: x[1])[0] # find max by sort_key else: return None