feat: materialsimpleserializer增加返回字段

This commit is contained in:
caoqianming 2025-01-02 14:50:47 +08:00
parent ba41228d69
commit 0a2f671f0f
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class MaterialSimpleSerializer(CustomModelSerializer):
class Meta:
model = Material
fields = ['id', 'name', 'number', 'model',
'specification', 'type', 'cate', 'brothers', 'process_name', 'full_name']
'specification', 'type', 'cate', 'brothers', 'process_name', 'full_name', "tracking"]
def get_full_name(self, obj):
return f'{obj.name}|{obj.specification if obj.specification else ""}|{obj.model if obj.model else ""}|{obj.process.name if obj.process else ""}'