* check that routine title is valid

* more updates

* small fixes

* override local routine

* more improvements to routine logic

* --debug runs .dev

* few more updates

* small fix

* rename BASE_URL from ultima to ULTIMA_BASE_URL

* use debug from dataclasses instead of env since env doesn't get updated

* create --dev flag that can point to .dev backend

* merge conflits

* few changes, made it actually work 🤣

* fix regex

---------

Co-authored-by: tehcoderer <me@tehcoderer.com>
This commit is contained in:
DidierRLopes
2023-08-14 05:20:25 -05:00
committed by GitHub
parent c40c3f7529
commit 5ddeb8f35e

View File

@@ -981,7 +981,8 @@ class BaseController(metaclass=ABCMeta):
# Check if title has a valid format
title = " ".join(ns_parser.name) if ns_parser.name else ""
pattern = re.compile(r"^[a-zA-Z0-9\s]+(?:[-a-zA-Z0-9\s]+)*$")
# To this day, the reason why /^[a-zA-Z0-9\s]+$/ does not work is unknown
pattern = re.compile(r"^[a-zA-Z0-9\s]+(?:[a-zA-Z0-9\s]+)*$")
if not pattern.match(title):
console.print(f"[red]The title '{title}' has invalid format. Please use only digits, characters and whitespaces.[/red]")
return