perf: su_method allow_null (#9352)

Co-authored-by: feng <1304903146@qq.com>
pull/9354/head
fit2bot 2 years ago committed by GitHub
parent 26de26d7b0
commit da915249ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -91,9 +91,7 @@ class PlatformSerializer(WritableNestedModelSerializer):
automation = PlatformAutomationSerializer(label=_("Automation"), required=False) automation = PlatformAutomationSerializer(label=_("Automation"), required=False)
su_method = LabeledChoiceField( su_method = LabeledChoiceField(
choices=[("sudo", "sudo su -"), ("su", "su - ")], choices=[("sudo", "sudo su -"), ("su", "su - ")],
label="切换方式", label="切换方式", required=False, default="sudo", allow_null=True
required=False,
default="sudo",
) )
class Meta: class Meta:

Loading…
Cancel
Save