From 6eccfb67cb9a3af250d280d2790b01e4bfd740d3 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 7 Jun 2024 09:50:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0riskpoint=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dpm/serializers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/dpm/serializers.py b/apps/dpm/serializers.py index ab85d9bc..c4818914 100644 --- a/apps/dpm/serializers.py +++ b/apps/dpm/serializers.py @@ -15,6 +15,9 @@ class RiskPointCreateUpdateSerializer(CustomModelSerializer): class RiskPointSerializer(CustomModelSerializer): + area_name = serializers.CharField(source='area.name', read_only=True) + dept_res_name = serializers.CharField(source='dept_res.name', read_only=True) + user_res_name = serializers.CharField(source='user_res.name', read_only=True) class Meta: model = RiskPoint fields = '__all__'