def sort_run(run):
        """Sort function for runs within a release."""
        # Sort errors first, then by name. Also show errors that were manually
        # approved, so the paging sort order stays the same even after users
        # approve a diff on the run page.
        if run.status in models.Run.DIFF_NEEDED_STATES:
            return (0, run.name)
        return (1, run.name)
def sort_run ( run ) : if run . status in models . Run . DIFF_NEEDED_STATES : return ( 0 , run . name ) return ( 1 , run . name )
Sort function for runs within a release.