aboutsummaryrefslogtreecommitdiff
path: root/budget/forms.py
diff options
context:
space:
mode:
authorAlexandre Avenel <avenel.alexandre@gmail.com>2015-04-12 20:41:57 +0200
committerAlexandre Avenel <avenel.alexandre@gmail.com>2015-04-12 20:41:57 +0200
commit4f4439eec9c13a0424b3dc33304feda8756c0116 (patch)
treece4ed8bbd35bffe1ba53873bda888c333d1de966 /budget/forms.py
parent7b338a2a1473a1b47689386e70d39ea75384716a (diff)
downloadihatemoney-mirror-4f4439eec9c13a0424b3dc33304feda8756c0116.zip
ihatemoney-mirror-4f4439eec9c13a0424b3dc33304feda8756c0116.tar.gz
ihatemoney-mirror-4f4439eec9c13a0424b3dc33304feda8756c0116.tar.bz2
Fix #118 : Create a new project with the name "dashboard" should raise an exception
Diffstat (limited to 'budget/forms.py')
-rw-r--r--budget/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/budget/forms.py b/budget/forms.py
index 9b11085..2dde57d 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 "