Update umap/views.py

Co-authored-by: David Larlet <3556+davidbgk@users.noreply.github.com>
This commit is contained in:
Yohan Boniface 2023-09-20 15:17:29 +02:00 committed by GitHub
parent 43e5391c49
commit f6730a9829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -275,7 +275,7 @@ class UserDashboard(PaginatorMixin, DetailView, SearchMixin):
def get_maps(self): def get_maps(self):
qs = self.get_search_queryset() or Map.objects.all() qs = self.get_search_queryset() or Map.objects.all()
qs = qs.filter(owner=self.object).union(qs.filter(editors=self.object)) qs = qs.union(qs.filter(owner=self.object), qs.filter(editors=self.object))
return qs.order_by("-modified_at") return qs.order_by("-modified_at")
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):