Fix bug with description on services

The service description was lost on any input error in the forms
for create and edit.
This commit is contained in:
Joachim Lusiardi 2018-08-16 06:58:11 +02:00
parent 346723ae2d
commit ae6dfa8ae6
1 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,9 @@ class CreateServiceForm(FlaskForm):
else:
self.costs.default = 0
if self.description.data:
self.description.default = self.description.data
class DeleteServiceForm(FlaskForm):
submit = SubmitField(label='Really delete this service!')
@ -67,4 +70,6 @@ class EditServiceForm(FlaskForm):
else:
self.costs.default = 0
if self.description.data:
self.description.default = self.description.data