add condition to update_badges

Signed-off-by: Stephan Pavlovic <stephan@railslove.com>