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:
@@ -63,9 +63,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, 5, 6)):
|
||||
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):
|
||||
@@ -73,5 +73,5 @@ 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'], ''))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user