From 31acad05a42f7c8782eadda3d11075bb6da25347 Mon Sep 17 00:00:00 2001 From: Les Orchard Date: Sat, 29 Dec 2012 22:54:10 -0500 Subject: [PATCH] Image can be missing in admin --- badger/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/badger/admin.py b/badger/admin.py index c97cd71..8ec9176 100644 --- a/badger/admin.py +++ b/badger/admin.py @@ -22,6 +22,8 @@ show_unicode.short_description = "Display" def show_image(obj): + if not obj.image: + return 'None' img_url = "%s%s" % (UPLOADS_URL, obj.image) return ('' % (img_url, img_url))