diff --git a/django_project/monitor/observation_views.py b/django_project/monitor/observation_views.py index 73fa03ed4..504b300e2 100644 --- a/django_project/monitor/observation_views.py +++ b/django_project/monitor/observation_views.py @@ -594,7 +594,7 @@ def get_queryset(self): return ObservationPestImage.objects.none() observation_pk = self.kwargs.get('observation_pk') - if not observation_pk: + if observation_pk is None: raise ValueError("Missing 'observation_pk' in URL") observation = get_object_or_404(Observations, pk=observation_pk)