Fix crash when no contests exists

Updated the context processor to not crash with an IndexError when no contests exists.