From aad824d127a5738fe00664062b99427d031eb502 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 9 Oct 2024 16:10:14 +0800 Subject: [PATCH] perf: add created_by field --- apps/ops/serializers/adhoc.py | 2 +- apps/ops/serializers/playbook.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ops/serializers/adhoc.py b/apps/ops/serializers/adhoc.py index 4b72860e5..4c73a01ea 100644 --- a/apps/ops/serializers/adhoc.py +++ b/apps/ops/serializers/adhoc.py @@ -15,5 +15,5 @@ class AdHocSerializer(ScopeSerializerMixin, CommonBulkModelSerializer): class Meta: model = AdHoc - read_only_field = ["id", "creator", "date_created", "date_updated"] + read_only_field = ["id", "creator", "date_created", "date_updated", "created_by"] fields = read_only_field + ["id", "name", "scope", "module", "args", "comment"] diff --git a/apps/ops/serializers/playbook.py b/apps/ops/serializers/playbook.py index c157251a6..e22e33068 100644 --- a/apps/ops/serializers/playbook.py +++ b/apps/ops/serializers/playbook.py @@ -25,7 +25,7 @@ class PlaybookSerializer(ScopeSerializerMixin, CommonBulkModelSerializer): class Meta: model = Playbook - read_only_fields = ["id", "date_created", "date_updated"] + read_only_fields = ["id", "date_created", "date_updated", "created_by"] fields = read_only_fields + [ "id", 'path', 'scope', "name", "comment", "creator", 'create_method', 'vcs_url',