mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-14 01:48:40 +01:00
Remove duplicate entries from django ticket query
This commit is contained in:
parent
a1b9d18557
commit
aea091b30c
@ -133,7 +133,7 @@ class __Query__:
|
|||||||
if sortreverse:
|
if sortreverse:
|
||||||
sorting = "-%s" % sorting
|
sorting = "-%s" % sorting
|
||||||
queryset = queryset.order_by(sorting)
|
queryset = queryset.order_by(sorting)
|
||||||
return queryset
|
return queryset.distinct() # https://stackoverflow.com/questions/30487056/django-queryset-contains-duplicate-entries
|
||||||
|
|
||||||
def get_cache_key(self):
|
def get_cache_key(self):
|
||||||
return str(self.huser.user.pk) + ":" + self.base64
|
return str(self.huser.user.pk) + ":" + self.base64
|
||||||
|
Loading…
Reference in New Issue
Block a user