From ff925cd0ce7599fc51ee9dcc06503a6727647d5f Mon Sep 17 00:00:00 2001 From: Mahbub Ul Alam Date: Tue, 26 Nov 2024 13:37:32 +0100 Subject: [PATCH] SS-1206 added a temporary path validation --- apps/models/app_types/shiny.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/models/app_types/shiny.py b/apps/models/app_types/shiny.py index ca56772d..2452fda9 100644 --- a/apps/models/app_types/shiny.py +++ b/apps/models/app_types/shiny.py @@ -1,6 +1,6 @@ -from django.db import models import regex as re from django.core.exceptions import ValidationError +from django.db import models from apps.models import ( AppInstanceManager, @@ -9,6 +9,7 @@ SocialMixin, ) + def validate_shiny_site_dir(candidate): """ Validates a shiny_site_dir path addition. @@ -58,8 +59,7 @@ class ShinyInstance(BaseAppInstance, SocialMixin, LogsEnabledMixin): container_waittime = models.IntegerField(default=20000) heartbeat_timeout = models.IntegerField(default=60000) heartbeat_rate = models.IntegerField(default=10000) - shiny_site_dir = models.CharField( - validators=[validate_shiny_site_dir], max_length=255, default="", blank=True) + shiny_site_dir = models.CharField(validators=[validate_shiny_site_dir], max_length=255, default="", blank=True) # The following three settings control the pre-init and seats behaviour (see documentation) # These settings override the Helm chart default values