From c1a0b2323bcfaf2beb934e60d253a6c41b72d798 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 25 Aug 2011 16:46:59 +0530 Subject: [PATCH] idx converted to integer --- cgi-bin/webnotes/model/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgi-bin/webnotes/model/utils.py b/cgi-bin/webnotes/model/utils.py index b9892067d3..07504093ca 100644 --- a/cgi-bin/webnotes/model/utils.py +++ b/cgi-bin/webnotes/model/utils.py @@ -74,13 +74,13 @@ def getlist(doclist, field): if d.type=='Phone': pl.append(d) """ - + from webnotes.utils import cint l = [] for d in doclist: if d.parent and (not d.parent.lower().startswith('old_parent:')) and d.parentfield == field: l.append(d) - l.sort(lambda a, b: a.idx - b.idx) + l.sort(lambda a, b: cint(a.idx) - cint(b.idx)) return l