PEP fixes in /InvenTree

This commit is contained in:
Oliver Walters 2019-04-14 09:33:17 +10:00
parent ac3a4e3de4
commit 29ab19d51d
4 changed files with 4 additions and 8 deletions

View File

@ -3,10 +3,10 @@ from __future__ import unicode_literals
from rest_framework import serializers from rest_framework import serializers
from rest_framework import generics from rest_framework import generics
from rest_framework import mixins
from django.contrib.auth.models import User from django.contrib.auth.models import User
class UserSerializer(serializers.ModelSerializer): class UserSerializer(serializers.ModelSerializer):
class Meta: class Meta:

View File

@ -9,7 +9,6 @@ from django.views.generic import UpdateView, CreateView, DeleteView
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from rest_framework import views from rest_framework import views
from django.http import JsonResponse
class TreeSerializer(views.APIView): class TreeSerializer(views.APIView):
@ -159,9 +158,6 @@ class AjaxUpdateView(AjaxMixin, UpdateView):
return response return response
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
response = super(UpdateView, self).get(request, *args, **kwargs)
if request.is_ajax(): if request.is_ajax():
form = self.form_class(instance=self.get_object()) form = self.form_class(instance=self.get_object())