X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8d8fb6e63435faa5de2d07a52812f23b1796a29d..948866cb20453892f057d497b3abf6d4b0677d8e:/apps/picture/models.py?ds=sidebyside diff --git a/apps/picture/models.py b/apps/picture/models.py index 1e27ce68e..c34b39a25 100644 --- a/apps/picture/models.py +++ b/apps/picture/models.py @@ -9,7 +9,7 @@ from django.template.loader import render_to_string from django.core.cache import get_cache from catalogue.utils import split_tags from django.utils.safestring import mark_safe -from slughifi import slughifi +from fnpdjango.utils.text.slughifi import slughifi from django.utils.translation import ugettext_lazy as _ from newtagging import managers @@ -148,7 +148,7 @@ class Picture(models.Model): for tag in catalogue.models.Tag.objects.filter(category='author'): pics_by_author[tag] = [] - for pic in pics: + for pic in pics.iterator(): authors = list(pic.tags.filter(category='author')) if authors: for author in authors: