From 4f4439eec9c13a0424b3dc33304feda8756c0116 Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Sun, 12 Apr 2015 20:41:57 +0200 Subject: [PATCH] Fix #118 : Create a new project with the name "dashboard" should raise an exception --- budget/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/budget/forms.py b/budget/forms.py index 9b110854..2dde57da 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -88,7 +88,7 @@ class ProjectForm(EditProjectForm): def validate_id(form, field): form.id.data = slugify(field.data) - if Project.query.get(form.id.data): + if (form.id.data == "dashboard") or Project.query.get(form.id.data): raise ValidationError(Markup(_("The project identifier is used " "to log in and for the URL of the project. " "We tried to generate an identifier for you but a project "