Open mbarton opened 3 weeks ago
https://github.com/rcpch/national-paediatric-diabetes-audit/blob/65fd924a03295a0be27e397eab86f84d8838ae5f/project/npda/views/patient.py#L322
super().form_valid(form) will also call patient.save.
super().form_valid(form)
patient.save
I noticed this because I saw two calls to imd_for_postcode. After #325 we calculate imd in PatientForm.save so this is less of an issue - fixing it would just save a database call.
imd_for_postcode
PatientForm.save
https://github.com/rcpch/national-paediatric-diabetes-audit/blob/65fd924a03295a0be27e397eab86f84d8838ae5f/project/npda/views/patient.py#L322
super().form_valid(form)
will also callpatient.save
.I noticed this because I saw two calls to
imd_for_postcode
. After #325 we calculate imd inPatientForm.save
so this is less of an issue - fixing it would just save a database call.