if neither password and username is given, subscription fails

This commit is contained in:
Nicolas Wavrant 2017-05-16 09:35:35 +02:00
parent f5e3925d9b
commit d54f6eb66e
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class FeedView(SyndicationFeed):
@csrf_exempt
def createAccount(request):
if 'username' not in request.POST \
or 'password' not in request.POST:
and 'password' not in request.POST:
return HttpResponse(status=500)
user = User.objects.create_user(request.POST['username'], password=request.POST['password'], is_active=False)