[enhancement] sort links on basis of link_count (idx)

This commit is contained in:
Rushabh Mehta
2016-03-11 14:33:04 +05:30
parent 22ef68945d
commit 3574b37ff3
2 changed files with 32 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ def get_product_list(search=None, start=0, limit=12):
search = "%" + cstr(search) + "%"
# order by
query += """ order by weightage desc, modified desc limit %s, %s""" % (start, limit)
query += """ order by weightage desc, idx desc, modified desc limit %s, %s""" % (start, limit)
data = frappe.db.sql(query, {
"search": search,