mirror of https://github.com/jumpserver/jumpserver
perf: execution automation ObjectRelatedField
parent
405344de74
commit
033750f108
|
@ -43,7 +43,7 @@ class AutomationExecutionSerializer(serializers.ModelSerializer):
|
|||
snapshot = serializers.SerializerMethodField(label=_('Automation snapshot'))
|
||||
trigger = LabeledChoiceField(choices=Trigger.choices, read_only=True, label=_("Trigger mode"))
|
||||
status = LabeledChoiceField(choices=Status.choices, read_only=True, label=_('Status'))
|
||||
automation = ObjectRelatedField(read_only=True, attrs=('id', 'name'))
|
||||
automation = ObjectRelatedField(required=False, queryset=BaseAutomation.objects, attrs=('id', 'name'))
|
||||
|
||||
class Meta:
|
||||
model = AutomationExecution
|
||||
|
|
Loading…
Reference in New Issue