1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#85 state:fixed] Fixed crash when sorting by Words Used after a Contents scan.

This commit is contained in:
Virgil Dupras
2010-02-05 17:47:17 +01:00
parent 25e12f1775
commit 7464e0f799
3 changed files with 9 additions and 9 deletions

View File

@@ -58,9 +58,9 @@ def GetDupeSortKey(dupe, get_group, key, delta):
return m.percentage
if key == 8:
return 0
r = cmp_value(getattr(dupe, COLUMNS[key]['attr']))
r = cmp_value(getattr(dupe, COLUMNS[key]['attr'], ''))
if delta and (key in (2, 4, 5)):
r -= cmp_value(getattr(get_group().ref, COLUMNS[key]['attr']))
r -= cmp_value(getattr(get_group().ref, COLUMNS[key]['attr'], ''))
return r
def GetGroupSortKey(group, key):
@@ -68,4 +68,4 @@ def GetGroupSortKey(group, key):
return group.percentage
if key == 8:
return len(group)
return cmp_value(getattr(group.ref, COLUMNS[key]['attr']))
return cmp_value(getattr(group.ref, COLUMNS[key]['attr'], ''))