Remove duplicate code

I found some duplicate code while reading config/views.py

This patch removes it.