We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0aaeed commit e108f3fCopy full SHA for e108f3f
1 file changed
manage_breast_screening/record_a_mammogram/views.py
@@ -157,7 +157,7 @@ class RecordMedicalInformation(BaseAppointmentForm):
157
def get_context_data(self, **kwargs):
158
context = super().get_context_data(**kwargs)
159
id = self.kwargs["id"]
160
- participant = Participant.objects.get(screeningepisode__appointment__id=id)
+ participant = get_object_or_404(Participant, screeningepisode__appointment__id=id)
161
context.update(
162
{
163
"title": "Record medical information",
0 commit comments