Update elections_detail.html

Need to stop the creation of new row when it's the last iteration of loop because when you are in the last element of the last row which can be divisible by 6 if we doesn't check this a new row will be created before leaving the loop.