revert psql distinct change

This commit is contained in:
vabene1111 2020-05-15 13:12:52 +02:00
parent cd11cc58cf
commit 744fbc7a46

View File

@ -46,8 +46,6 @@ def search(request):
if request.GET == {}:
qs = Recipe.objects.filter(viewlog__created_by=request.user).order_by('-viewlog__created_at').all()[0:5]
if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2':
qs = Recipe.objects.filter(viewlog__created_by=request.user).distinct('name').order_by('-viewlog__created_at').all()[0:5]
last_viewed = RecipeTable(qs)
else: