From: Radek Czajka Date: Mon, 17 Jun 2019 13:33:22 +0000 (+0200) Subject: Cite corner case support in admin. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3dedc53f7fb80f12d84834af93337dfc19a9276c?ds=inline;hp=a169ba7caa0d9d83fddcbad5ed05f536e0ca1b9e Cite corner case support in admin. --- diff --git a/src/social/admin.py b/src/social/admin.py index 0a634ed89..bceb89008 100755 --- a/src/social/admin.py +++ b/src/social/admin.py @@ -25,7 +25,7 @@ class CiteAdmin(admin.ModelAdmin): def nonempty_text(self, cite): if cite.text.strip(): return cite.text - return "(%s)" % (cite.image_title.strip() or cite.link) + return "(%s)" % ((cite.image_title or '').strip() or cite.link) nonempty_text.short_description = _('text') def has_image(self, cite):