Merge branch 'master' into production
[wolnelektury.git] / apps / picture / models.py
index 1e27ce6..dd6ae8e 100644 (file)
@@ -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: