Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate tag #6306

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions kitsune/questions/jinja2/questions/question_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,6 @@ <h1 class="sumo-page-heading {% if not logo %}no-logo{% endif %}">
<aside class="forum--meta question-meta {% if not question.num_answers %}urgent{% endif %}">
{% set tags = question.my_tags %}
<ul class="tag-list push-right">
{% if question.topic %}
{% set topic = question.topic %}
<li class="tag">
<a class="tag-name" href="{{ url('questions.list', question.product.slug)|urlparams(None, request.GET, topic=None) }}">
{{ pgettext('DB: products.Product.title', question.product.title) }}
</a>
</li>
{% endif %}
{% for tag in tags %}
<li class="tag"><a class="tag-name" href="{{ questions_url(tagged=tag.slug) }}">{{ tag }}</a></li>
{% endfor %}
Expand Down
12 changes: 0 additions & 12 deletions kitsune/questions/tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,18 +1201,6 @@ def test_show_is_empty_string_doesnt_500(self):
response = self.client.get(urlparams(reverse("questions.list", args=["all"]), show=""))
self.assertEqual(200, response.status_code)

def test_product_shows_without_tags(self):
p = ProductFactory()
t = TopicFactory()
t.products.add(p)
q = QuestionFactory(topic=t, product=p)

response = self.client.get(urlparams(reverse("questions.list", args=["all"]), show=""))
doc = pq(response.content)
tag = doc("#question-{id} .tag-list li a".format(id=q.id))
# Even though there are no tags, the product should be displayed.
assert p.title in tag[0].text


class QuestionsTemplateTestCaseNoFixtures(TestCase):
def test_locked_questions_dont_appear(self):
Expand Down