Minor cleanup

This commit is contained in:
Martin Mahner 2018-06-22 13:14:06 +02:00
parent 0a0096fc16
commit 3478772844
2 changed files with 1 additions and 3 deletions

View file

@ -3,7 +3,6 @@ import difflib
import json
from django.apps import apps
from django.db.models import Count
from django.http import (Http404, HttpResponse, HttpResponseBadRequest,
HttpResponseRedirect)
from django.shortcuts import get_object_or_404
@ -259,7 +258,7 @@ class APIView(View):
s.save()
formatter = getattr(self, '_format_{0}'.format(response_format), None)
if not formatter:
if formatter:
response = self._format_default(s)
else:
response = formatter(s)

View file

@ -12,4 +12,3 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dpaste.settings.local")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()