浏览代码

Merge pull request #2713 from KanchanChauhan/primary-on-top

[Fix] Primary Contact on top of list
version-14
Nabin Hait 8 年前
committed by GitHub
父节点
当前提交
b293f12822
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      frappe/geo/address_and_contact.py

+ 2
- 2
frappe/geo/address_and_contact.py 查看文件

@@ -21,7 +21,7 @@ def load_address_and_contact(doc, key):
address_list = sorted(address_list,
lambda a, b:
(int(a.is_primary_address - b.is_primary_address)) or
(1 if a.modified - b.modified else 0))
(1 if a.modified - b.modified else 0), reverse=True)

doc.set_onload('addr_list', address_list)

@@ -36,7 +36,7 @@ def load_address_and_contact(doc, key):
contact_list = sorted(contact_list,
lambda a, b:
(int(a.is_primary_contact - b.is_primary_contact)) or
(1 if a.modified - b.modified else 0))
(1 if a.modified - b.modified else 0), reverse=True)

doc.set_onload('contact_list', contact_list)



正在加载...
取消
保存