From 4a74cd21994fbbfebda36bbba41ead187a507da3 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 11 Apr 2017 23:15:17 +1000 Subject: [PATCH] style errors --- InvenTree/project/serializers.py | 5 +---- InvenTree/project/views.py | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/InvenTree/project/serializers.py b/InvenTree/project/serializers.py index 4123968042..f4a0daecec 100644 --- a/InvenTree/project/serializers.py +++ b/InvenTree/project/serializers.py @@ -2,8 +2,6 @@ from rest_framework import serializers from .models import ProjectCategory, Project, ProjectPart -from part.serializers import PartBriefSerializer - class ProjectPartSerializer(serializers.ModelSerializer): @@ -21,7 +19,6 @@ class ProjectBriefSerializer(serializers.ModelSerializer): """ Serializer for displaying brief overview of a project """ - class Meta: model = Project fields = ('pk', @@ -46,7 +43,7 @@ class ProjectCategoryBriefSerializer(serializers.ModelSerializer): class Meta: model = ProjectCategory - fields = ('pk','name','description') + fields = ('pk', 'name', 'description') class ProjectCategoryDetailSerializer(serializers.ModelSerializer): diff --git a/InvenTree/project/views.py b/InvenTree/project/views.py index a92158ff48..46a5fdb0c4 100644 --- a/InvenTree/project/views.py +++ b/InvenTree/project/views.py @@ -2,9 +2,10 @@ from rest_framework import generics from .models import ProjectCategory, Project, ProjectPart from .serializers import ProjectBriefSerializer, ProjectDetailSerializer -from .serializers import ProjectCategoryBriefSerializer, ProjectCategoryDetailSerializer +from .serializers import ProjectCategoryDetailSerializer from .serializers import ProjectPartSerializer + class ProjectDetail(generics.RetrieveAPIView): queryset = Project.objects.all() @@ -17,7 +18,6 @@ class ProjectList(generics.ListAPIView): serializer_class = ProjectBriefSerializer - class ProjectCategoryDetail(generics.RetrieveAPIView): queryset = ProjectCategory.objects.all()