X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/06ae2ba67e697b8fa06229fc3117d4b081db1130..49e2be0521e11928d5f00378907e478d1bd703a4:/apps/catalogue/models.py diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 8b65d4bbb..6470ebb83 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -174,7 +174,11 @@ class Tag(TagBase): try: tag_names = getattr(info, field_name) except: - tag_names = [getattr(info, category)] + try: + tag_names = [getattr(info, category)] + except: + # For instance, Pictures do not have 'genre' field. + continue for tag_name in tag_names: tag_sort_key = tag_name if category == 'author':