Skip to content

Commit 8346730

Browse files
committed
make sure temp project key is valid [ch50625]
1 parent 1f51e1e commit 8346730

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dataikuapi/dss/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
import re
23
import os.path as osp
34
from .future import DSSFuture
45
from dataikuapi.utils import DataikuException
@@ -40,7 +41,8 @@ def create_instance(self, instance_key, instance_name, wait=True):
4041
return future
4142

4243
def make_random_project_key(self):
43-
return "%s_tmp_%s" % (self.app_id, random_string(10))
44+
slugified_app_id = re.sub(r'[^A-Za-z_0-9]+', '_', self.app_id)
45+
return "%s_tmp_%s" % (slugified_app_id, random_string(10))
4446

4547
def create_temporary_instance(self):
4648
"""

0 commit comments

Comments
 (0)