X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c45712b06f5616cb0ec42e8fc4497045cbde6321..f6b59a872054fb7e4c171cbdffb5470d55c9025e:/forum/views/readers.py diff --git a/forum/views/readers.py b/forum/views/readers.py index b61e3e9..38c3c9f 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -243,7 +243,7 @@ def update_question_view_times(request, question): request.session['last_seen_in_question'][question.id] = datetime.datetime.now() -def match_question_slug(slug): +def match_question_slug(id, slug): slug_words = slug.split('-') qs = Question.objects.filter(title__istartswith=slug_words[0]) @@ -287,7 +287,7 @@ def question(request, id, slug='', answer=None): question = Question.objects.get(id=id) except: if slug: - question = match_question_slug(slug) + question = match_question_slug(id, slug) if question is not None: return HttpResponseRedirect(question.get_absolute_url())