From 34787728442a601c28b9e5d816919dab4899f86f Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Fri, 22 Jun 2018 13:14:06 +0200 Subject: [PATCH] Minor cleanup --- dpaste/views.py | 3 +-- dpaste/wsgi.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dpaste/views.py b/dpaste/views.py index f51d971..2dfe89d 100644 --- a/dpaste/views.py +++ b/dpaste/views.py @@ -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) diff --git a/dpaste/wsgi.py b/dpaste/wsgi.py index 9063591..4470c5f 100644 --- a/dpaste/wsgi.py +++ b/dpaste/wsgi.py @@ -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() -