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 import json
from django.apps import apps from django.apps import apps
from django.db.models import Count
from django.http import (Http404, HttpResponse, HttpResponseBadRequest, from django.http import (Http404, HttpResponse, HttpResponseBadRequest,
HttpResponseRedirect) HttpResponseRedirect)
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
@ -259,7 +258,7 @@ class APIView(View):
s.save() s.save()
formatter = getattr(self, '_format_{0}'.format(response_format), None) formatter = getattr(self, '_format_{0}'.format(response_format), None)
if not formatter: if formatter:
response = self._format_default(s) response = self._format_default(s)
else: else:
response = formatter(s) 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 from django.core.wsgi import get_wsgi_application
application = get_wsgi_application() application = get_wsgi_application()