Fix 500 error with badge for pending build

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>