revert psql distinct change
This commit is contained in:
parent
cd11cc58cf
commit
744fbc7a46
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user