From 7a6498fcb87f1e544af26946fa27668081bea78b Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 1 Aug 2011 10:48:10 +0000 Subject: [PATCH] Resolves Jira OSQA-732, check twice for NoReverseMatch exceptions, try passing only the slug as an argument, this was causing the 'overview' tab in the user profile to disappear git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1144 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/views/users.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forum/views/users.py b/forum/views/users.py index cf9b373..82e8175 100644 --- a/forum/views/users.py +++ b/forum/views/users.py @@ -305,7 +305,10 @@ def user_view(template, tab_name, tab_title, tab_description, private=False, tab try: return reverse(fn.__name__, kwargs={'id': vu.id, 'slug': slugify(smart_unicode(vu.username))}) except NoReverseMatch: - return reverse(fn.__name__, kwargs={'id': vu.id}) + try: + return reverse(fn.__name__, kwargs={'id': vu.id}) + except NoReverseMatch: + return reverse(fn.__name__, kwargs={'slug': slugify(smart_unicode(vu.username))}) ui.register(ui.PROFILE_TABS, ui.ProfileTab( tab_name, tab_title, tab_description,url_getter, private, render_to, weight -- 2.39.5