mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-21 04:33:06 +02:00
CustomNodeComparator: Allow access to the VimwikiTask's attributes too
This commit is contained in:
parent
dcfd95b7c3
commit
0b1705280b
1 changed files with 2 additions and 2 deletions
|
@ -89,8 +89,8 @@ class CustomNodeComparator(object):
|
||||||
def generic_compare(self, first, second, method):
|
def generic_compare(self, first, second, method):
|
||||||
for sort_attr, reverse in self.sort_attrs:
|
for sort_attr, reverse in self.sort_attrs:
|
||||||
# Pick the values we are supposed to sort on
|
# Pick the values we are supposed to sort on
|
||||||
first_value = first.vwtask.task[sort_attr]
|
first_value = first.vwtask[sort_attr]
|
||||||
second_value = second.vwtask.task[sort_attr]
|
second_value = second.vwtask[sort_attr]
|
||||||
|
|
||||||
# Swap the method of the sort if reversed is True
|
# Swap the method of the sort if reversed is True
|
||||||
if method == 'gt' and reverse == True:
|
if method == 'gt' and reverse == True:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue