Skip to content
Snippets Groups Projects
Commit f7472a44 authored by Carlos Vega's avatar Carlos Vega
Browse files

fixed issue when validating study subject form in edit appointment view

parent edbdc736
No related branches found
No related tags found
1 merge request!206Improvement/interface changes
......@@ -103,7 +103,8 @@ def appointment_edit(request, id):
status=Appointment.APPOINTMENT_STATUS_FINISHED).count() == 0:
adjust_date = True
if appointment_form.cleaned_data["status"] == Appointment.APPOINTMENT_STATUS_FINISHED:
if not study.check_nd_number(study_subject_form.cleaned_data["nd_number"]):
nd_number = study_subject_form.cleaned_data["nd_number"]
if (nd_number is not None or nd_number != "") and not study.check_nd_number(nd_number):
study_subject_form.add_error('nd_number', ValidationError("invalid ND number"))
is_valid_form = False
if is_valid_form:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment