Skip to content

Commit

Permalink
[#17]
Browse files Browse the repository at this point in the history
修改供应商一个bug
  • Loading branch information
eyeeco committed Jan 12, 2018
1 parent 7f26f0f commit 20dddab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Procurement/api/supplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_serializer_class(self):
elif self.action == "retrieve":
return serializers.SupplierDetailSerializer
else:
return serializers.SupplierSerializer
return serializers.SupplierDetailSerializer


# 供应商文件
Expand Down
10 changes: 5 additions & 5 deletions Procurement/serializers/supplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ class Meta:


class SupplierListSerializer(SupplierSerializer):
doc = SupplierDocumentSerializer(read_only=True, many=True)
docs = SupplierDocumentSerializer(read_only=True, many=True)

class Meta(SupplierSerializer.Meta):
fields = '__all__'
fields = ('id', 'uid', 'name', 'docs')


class SupplierDetailSerializer(SupplierSerializer):
doc = SupplierDocumentSerializer(read_only=True, many=True)
quotation = QuotationSerializer(read_only=True, many=True)
docs = SupplierDocumentSerializer(read_only=True, many=True)
quotations = QuotationSerializer(read_only=True, many=True)

class Meta(SupplierSerializer.Meta):
fields = '__all__'
fields = ('id', 'uid', 'name', 'docs', 'quotations')


# 供应商关系
Expand Down

0 comments on commit 20dddab

Please sign in to comment.