Browse Source

perf: add created_by field

pull/14272/head
wangruidong 1 month ago committed by w940853815
parent
commit
aad824d127
  1. 2
      apps/ops/serializers/adhoc.py
  2. 2
      apps/ops/serializers/playbook.py

2
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"]

2
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',

Loading…
Cancel
Save