From 6667b017669ffbae98ce70f5472f107b91da36d5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 27 Dec 2012 23:56:34 -0600 Subject: Allow pkg_details_link to return link title if package is missing For todolist packages that have had their package removed, this will allow the package name to continue to appear even after the linked package has been deleted. Signed-off-by: Dan McGee --- packages/templatetags/package_extras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index f3613e69..f14fab1e 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -63,7 +63,7 @@ def do_buildsortqs(parser, token): @register.simple_tag def pkg_details_link(pkg, link_title=None): if not pkg: - return '' + return link_title or '' if link_title is None: link_title = pkg.pkgname link = '%s' -- cgit v1.2.3-2-g168b