diff --git a/smash/web/views/worker.py b/smash/web/views/worker.py index f5081609c4342c31de19d419651de2d84de034a8..278f3a80e2180c5b031cfc48c18c73c0b9b4678f 100644 --- a/smash/web/views/worker.py +++ b/smash/web/views/worker.py @@ -120,6 +120,7 @@ def worker_holiday_add(request, doctor_id): doctor = doctors[0] if request.method == 'POST': form = HolidayAddForm(request.POST, request.FILES) + if form.is_valid(): form.save() return redirect(worker_edit, worker_id=doctor_id) @@ -128,5 +129,6 @@ def worker_holiday_add(request, doctor_id): return wrap_response(request, 'doctors/add_holiday.html', { 'form': form, - 'doctor_id': doctor_id + 'doctor_id': doctor_id, + 'doctor_name': unicode(doctor) })