summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-05-05 22:08:06 -0400
committerluxagraf <sng@luxagraf.net>2018-05-05 22:08:06 -0400
commit6cfbc4ed9a70b8fbfdd08294ae35a7bf36e95ac8 (patch)
tree95603a0099efa8b87d00c49dcce585ca91f6a564 /app
parentee01fffc0722eeb62136434bd596967f6321ddde (diff)
added distinct to wildlife query to handle places we've visited twice.
Diffstat (limited to 'app')
-rw-r--r--app/jrnl/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/jrnl/views.py b/app/jrnl/views.py
index 75501f4..980038c 100644
--- a/app/jrnl/views.py
+++ b/app/jrnl/views.py
@@ -82,7 +82,7 @@ class EntryDetailView(DetailView):
def get_context_data(self, **kwargs):
context = super(EntryDetailView, self).get_context_data(**kwargs)
- context['wildlife'] = Sighting.objects.filter(location=self.get_object().location).order_by('ap__apclass__kind')
+ context['wildlife'] = Sighting.objects.filter(location=self.get_object().location).distinct().order_by('ap__apclass__kind')
return context
class EntryDetailViewTXT(EntryDetailView):