From 4046c6f0bf5229a442e5541180954891d7534fc3 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 29 Mar 2017 23:45:27 +1100 Subject: [PATCH] Added gitattributes file --- .gitattributes | 6 ++++++ InvenTree/part/serializers.py | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..db355084a6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +* text=auto + +*.py text +*.md text +*.html text +*.txt text diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 267db2b40c..9dea0f0231 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -12,9 +12,9 @@ class ParameterSerializer(serializers.ModelSerializer): class PartSerializer(serializers.ModelSerializer): - + params = ParameterSerializer(source='parameters', many=True) - + class Meta: model = Part fields = ('pk', @@ -24,12 +24,13 @@ class PartSerializer(serializers.ModelSerializer): 'category', 'stock', 'params') - - + + class PartCategorySerializer(serializers.ModelSerializer): class Meta: model = PartCategory fields = ('pk', 'name', 'description', + 'parent', 'path')