mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Fix regex (#5320)
* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user