From 67ccdd0393c5a424abb8e8a5924612dee6080114 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 28 Mar 2020 20:45:14 +0100 Subject: fix: filter for app name --- src/frest/manage/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/frest/manage/utils.py b/src/frest/manage/utils.py index 4f35937..8ff6dcb 100644 --- a/src/frest/manage/utils.py +++ b/src/frest/manage/utils.py @@ -112,7 +112,12 @@ def create_model_cli(name): def create_app(name): - name = name.lower() + name = name.lower().replace('-', '_') + + if name.isdigit() or name[0].isdigit(): + logging("Name cannot be a number o starts with a number", 2) + return + if len(name) < 2: logging("Name of app must be minimun 2 characters long", 2) return -- cgit v1.2.3-18-g5258