Bläddra i källkod

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

[Fix] Primary Contact on top of list
version-14
Nabin Hait 8 år sedan
committed by GitHub
förälder
incheckning
b293f12822
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. +2
    -2
      frappe/geo/address_and_contact.py

+ 2
- 2
frappe/geo/address_and_contact.py Visa fil

@@ -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)



Laddar…
Avbryt
Spara