views: fix typo in exception name

This commit is contained in:
Benjamin Dauvergne 2015-08-27 16:21:27 +02:00
parent 7fa7cad775
commit 24af6fb3dd
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ def index(request):
logger = logging.getLogger(__name__)
try:
restriction = models.ProfileUpdate.objects.get(user=request.user)
except models.ProfileUpdate:
except models.ProfileUpdate.DoesNotExist:
return continue_to_next_url(request)
if restriction.updated is not None and \
(now() - restriction.updated) >= timedelta(days=7):