Fix sorting tasks by bool values
There was a bug where it would return all tasks with a true value before the ones with a false value. This is the exact opposite of what the db does, leading to wrongly sorted values
This commit is contained in:
@ -146,9 +146,9 @@ func mustMakeComparator(fieldName string) taskComparator {
|
||||
return func(lhs, rhs *Task) int64 {
|
||||
boolLHS, boolRHS := extractProp(lhs).(bool), extractProp(rhs).(bool)
|
||||
if !boolLHS && boolRHS {
|
||||
return 1
|
||||
} else if boolLHS && !boolRHS {
|
||||
return -1
|
||||
} else if boolLHS && !boolRHS {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user