X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c26ab6ee15974c1133a6d08c459b51199185f25f..4af4ef861ca5d4f1684fa0f36a91c2632bbff1bc:/apps/reporting/views.py?ds=inline diff --git a/apps/reporting/views.py b/apps/reporting/views.py index bf043f238..cb87f8122 100644 --- a/apps/reporting/views.py +++ b/apps/reporting/views.py @@ -21,7 +21,7 @@ def stats_page(request): annotate(count=Count('type')).\ order_by('type') for mt in media_types: - mt['size'] = sum(b.file.size for b in BookMedia.objects.filter(type=mt['type'])) + mt['size'] = sum(b.file.size for b in BookMedia.objects.filter(type=mt['type']).iterator()) if mt['type'] in ('mp3', 'ogg'): deprecated = BookMedia.objects.filter( type=mt['type'], source_sha1=None)