DL: Align with online backend on allowed characters.

CURA-8395
This commit is contained in:
Remco Burema 2021-07-20 17:58:29 +02:00
parent 918d1f188b
commit 71937bf828
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
3 changed files with 6 additions and 8 deletions

View file

@ -365,12 +365,10 @@ class DigitalFactoryApiClient:
:param on_finished: The function to be called after the result is parsed.
:param on_error: The function to be called if anything goes wrong.
"""
display_name = re.sub(r"^[\\w\\-\\. ()]+\\.[a-zA-Z0-9]+$", " ", project_name)
Logger.log("i", "Attempt to create new DF project '{}'.".format(display_name))
Logger.log("i", "Attempt to create new DF project '{}'.".format(project_name))
url = "{}/projects".format(self.CURA_API_ROOT)
data = json.dumps({"data": {"display_name": display_name}}).encode()
data = json.dumps({"data": {"display_name": project_name}}).encode()
self._http.put(url,
scope = self._scope,
data = data,