# HG changeset patch # User bsw # Date 1363533949 -3600 # Node ID bb5a337b5f2a732de8bdeca16fd2ebaa78346d38 # Parent a54d75e313d172cec1d7c1b9dd111077abeacfc9 Fix ordering of revoked initiatives diff -r a54d75e313d1 -r bb5a337b5f2a app/main/event/_list.lua --- a/app/main/event/_list.lua Sun Mar 17 15:55:30 2013 +0100 +++ b/app/main/event/_list.lua Sun Mar 17 16:25:49 2013 +0100 @@ -166,7 +166,7 @@ if not event.initiative_id then local initiatives_selector = Initiative:new_selector() :add_where{ "initiative.issue_id = ?", event.issue_id } - :add_order_by("initiative.admitted DESC, initiative.rank, initiative.harmonic_weight DESC NULLS LAST, id") + :add_order_by("initiative.admitted DESC NULLS LAST, initiative.rank NULLS LAST, initiative.harmonic_weight DESC NULLS LAST, id") execute.view{ module = "initiative", view = "_list", params = { issue = event.issue, initiatives_selector = initiatives_selector, diff -r a54d75e313d1 -r bb5a337b5f2a model/issue.lua --- a/model/issue.lua Sun Mar 17 15:55:30 2013 +0100 +++ b/model/issue.lua Sun Mar 17 16:25:49 2013 +0100 @@ -37,7 +37,7 @@ that_key = 'issue_id', ref = 'initiatives', back_ref = 'issue', - default_order = 'initiative.admitted DESC, initiative.rank, initiative.harmonic_weight DESC NULLS LAST, id' + default_order = 'initiative.admitted DESC NULLS LAST, initiative.rank NULLS LAST, initiative.harmonic_weight DESC NULLS LAST, id' } Issue:add_reference{