2045aa1 Fix the logic around showing who won the election

4 files Authored by pingou 5 years ago, Committed by pingou 5 years ago,
    Fix the logic around showing who won the election
    
    With more recent version of jinja2 the way we were using {% set %} was
    no longer working because of the limited scope of this macro.
    With this commit we replace the use of {% set %} in the inner scope by
    using a list and just checking the last element in that list.
    From there, we could mimic the old behavior we had with sets.
    
    For simplicity, we also moved the sorting of the candidates out of the
    templates and into the controller just before calling the template.
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
    
        
file modified
+4 -1