From: Christopher Allan Webber Date: Fri, 12 Aug 2011 01:15:55 +0000 (-0500) Subject: Making the users_with_username function call in the register view slightly cleaner X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dc49cf600aba92331419a3566f768b061b8102e3;p=mediagoblin.git Making the users_with_username function call in the register view slightly cleaner --- diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 121a8c8e..dc90173e 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -45,10 +45,8 @@ def register(request): if request.method == 'POST' and register_form.validate(): # TODO: Make sure the user doesn't exist already - users_with_username = \ - request.db.User.find({ - 'username': request.POST['username'].lower() - }).count() + users_with_username = request.db.User.find( + {'username': request.POST['username'].lower()}).count() if users_with_username: register_form.username.errors.append(