Allow non-ASCII characters for DL project names.

CURA-8395
This commit is contained in:
Remco Burema 2021-07-16 12:39:41 +02:00
parent c2f2304512
commit f9557295fa
No known key found for this signature in database
GPG key ID: 215C49431D43F98C

View file

@ -366,7 +366,7 @@ class DigitalFactoryApiClient:
:param on_error: The function to be called if anything goes wrong.
"""
display_name = re.sub(r"[^a-zA-Z0-9- ./™®ö+']", " ", project_name)
display_name = re.sub(r"^[\\w\\-\\. ()]+\\.[a-zA-Z0-9]+$", " ", project_name)
Logger.log("i", "Attempt to create new DF project '{}'.".format(display_name))
url = "{}/projects".format(self.CURA_API_ROOT)