From 3dedc53f7fb80f12d84834af93337dfc19a9276c Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 17 Jun 2019 15:33:22 +0200 Subject: [PATCH 1/1] Cite corner case support in admin. --- src/social/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.20.1