From 24020ea12295b030dea48a5815a19c50f842dea0 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 31 Jan 2024 16:53:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20DrainEquipEnvSerializer=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E5=AE=8C=E6=95=B4=E7=9A=84=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enp/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/enp/serializers.py b/apps/enp/serializers.py index e3d3b8e8..0e8d3f4f 100644 --- a/apps/enp/serializers.py +++ b/apps/enp/serializers.py @@ -47,6 +47,8 @@ class DrainEquipEnvSerializer(CustomModelSerializer): equipment_name = serializers.CharField( source='equipment.name', read_only=True) equipment_envdata = serializers.SerializerMethodField() + equipment_ = EquipmentSerializer(source='equipment', read_only=True) + drain_ = DrainSerializer(source='drain', read_only=True) def get_equipment_envdata(self, obj): now = timezone.now()