improvement in showing diff for 2 histiey pages

bzr revid: mga@tinyerp.com-20081203142505-p91cklqh2gc047em
This commit is contained in:
Mantavya Gajjar 2008-12-03 19:55:05 +05:30
parent 452c12f8ed
commit 6b1d204031
1 changed files with 1 additions and 2 deletions

View File

@ -39,8 +39,7 @@ class showdiff(osv.osv_memory):
old = history.browse(cr, uid, ids[0])
nids = history.search(cr, uid, [('wiki_id','=',old.wiki_id.id)])
nids.sort()
if ids[0] != nids[-1]:
diff = history.getDiff(cr, uid, ids[0], nids[-1])
diff = history.getDiff(cr, uid, ids[0], nids[-1])
else:
raise osv.except_osv('Warning', "You need to select minimum 1 or maximum 2 history revision!")
return diff