Skip to content

Commit

Permalink
CONCD-675 reverting this change (will no longer be needed) (#2267)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasarkar authored Feb 6, 2024
1 parent 78b580d commit e34b410
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions concordia/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,17 +1200,6 @@ def get_queryset(self):

return asset_qs

def get_guides(self):
guides = list(Guide.objects.order_by("order").values("title", "body"))
titles = [guide["title"].lower() for guide in guides]
for title in ("how to transcribe", "how to review", "how to tag"):
if title not in titles:
pages = SimplePage.objects.filter(title__iexact=title)
if pages.count() > 0:
page = pages.first()
guides.append({"title": page.title, "body": page.body})
return guides

def get_context_data(self, **kwargs):
"""
Handle the GET request
Expand Down Expand Up @@ -1322,8 +1311,8 @@ def get_context_data(self, **kwargs):
ordered_cards = unordered_cards.order_by("order")
ctx["cards"] = [tutorial_card.card for tutorial_card in ordered_cards]

guides = self.get_guides()
if len(guides) > 0:
guides = Guide.objects.order_by("order").values("title", "body")
if guides.count() > 0:
ctx["guides"] = guides

return ctx
Expand Down

0 comments on commit e34b410

Please sign in to comment.