diff --git a/api/tacticalrmm/scripts/serializers.py b/api/tacticalrmm/scripts/serializers.py index 6c7d80e0..12d12f32 100644 --- a/api/tacticalrmm/scripts/serializers.py +++ b/api/tacticalrmm/scripts/serializers.py @@ -48,6 +48,7 @@ class ScriptSerializer(ModelSerializer): "run_as_user", "env_vars", ] + extra_kwargs = {"script_body": {"trim_whitespace": False}} class ScriptCheckSerializer(ModelSerializer): @@ -63,3 +64,4 @@ class ScriptSnippetSerializer(ModelSerializer): class Meta: model = ScriptSnippet fields = "__all__" + extra_kwargs = {"code": {"trim_whitespace": False}}