From 22ad340d439f4add9cc476e54aa68643c743ebe3 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sat, 25 Nov 2023 15:36:10 +0100 Subject: [PATCH] Filter locations by user --- vrobbler/apps/locations/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrobbler/apps/locations/views.py b/vrobbler/apps/locations/views.py index 0f3de25..50a95ce 100644 --- a/vrobbler/apps/locations/views.py +++ b/vrobbler/apps/locations/views.py @@ -9,7 +9,7 @@ class GeoLocationListView(generic.ListView): paginate_by = 75 def get_queryset(self): - return super().get_queryset().order_by("-created") + return super().get_queryset().filter(scrobble__user_id=self.request.user.id).order_by("-created") def get_context_data(self, **kwargs): context_data = super().get_context_data(**kwargs)