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

remove redundant code

parent 7390bf23
No related branches found
No related tags found
1 merge request!206Improvement/interface changes
......@@ -106,11 +106,7 @@ def appointment_edit(request, id):
Appointment.objects.filter(visit=the_appointment.visit,
status=Appointment.APPOINTMENT_STATUS_FINISHED).count() == 0:
adjust_date = True
if appointment_form.cleaned_data["status"] == Appointment.APPOINTMENT_STATUS_FINISHED:
nd_number = study_subject_form.cleaned_data["nd_number"]
if (nd_number is not None and 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:
appointment_form.save()
if study_subject_form is not None:
......
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