Skip to content
Snippets Groups Projects
Commit 04aa33af authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix get redtime in anonymous mode

parent 0bd4da52
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ from django.core.management.base import BaseCommand ...@@ -7,7 +7,7 @@ from django.core.management.base import BaseCommand
from django.core.management import call_command from django.core.management import call_command
#from opds_catalog.settings import SERVER_LOG, SERVER_PID #from opds_catalog.settings import SERVER_LOG, SERVER_PID
#from opds_catalog import settings #from opds_cgit branchtalog import settings
from constance import config from constance import config
class Command(BaseCommand): class Command(BaseCommand):
......
...@@ -208,7 +208,7 @@ def SearchBooksView(request): ...@@ -208,7 +208,7 @@ def SearchBooksView(request):
'registerdate': row.registerdate, 'id': row.id, 'annotation': strip_tags(row.annotation), \ 'registerdate': row.registerdate, 'id': row.id, 'annotation': strip_tags(row.annotation), \
'docdate': row.docdate, 'format': row.format, 'title': row.title, 'filesize': row.filesize//1000,\ 'docdate': row.docdate, 'format': row.format, 'title': row.title, 'filesize': row.filesize//1000,\
'authors': row.authors.values(), 'genres': row.genres.values(), 'series': row.series.values(),'ser_no': row.bseries_set.values('ser_no'),\ 'authors': row.authors.values(), 'genres': row.genres.values(), 'series': row.series.values(),'ser_no': row.bseries_set.values('ser_no'),\
'readtime':row.bookshelf_set.filter(user=request.user).values('readtime') 'readtime':row.bookshelf_set.filter(user=request.user).values('readtime') if config.SOPDS_AUTH else None
} }
if summary_DOUBLES_HIDE: if summary_DOUBLES_HIDE:
title = p['title'] title = p['title']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment