Skip to content

Commit

Permalink
bug fix at index. deleted blog post was showing up.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebamus committed Aug 7, 2023
1 parent 8df0404 commit 4b84647
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions home/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_context_data(self, **kwargs):
.select_related("projectpost__author")
)
study = (
OnlineStudyPost.objects.all()[:3]
OnlineStudyPost.activate_objects.get_data()[:3]
.annotate(table=Value("OnlineStudy"))
.values(
"pk",
Expand All @@ -57,7 +57,7 @@ def get_context_data(self, **kwargs):
)
)
blog = (
BlogPost.objects.all()[:3]
BlogPost.activate_objects.get_data()[:3]
.annotate(table=Value("Blog"))
.values(
"pk",
Expand All @@ -72,7 +72,7 @@ def get_context_data(self, **kwargs):
)
)
opensource = (
OpenSourcePost.objects.all()[:3]
OpenSourcePost.activate_objects.get_data()[:3]
.annotate(table=Value("OpenSource"))
.values(
"pk",
Expand All @@ -87,7 +87,7 @@ def get_context_data(self, **kwargs):
)
)
books = (
BooksPost.objects.all()[:3]
BooksPost.activate_objects.get_data()[:3]
.annotate(table=Value("Books"))
.values(
"pk",
Expand Down
2 changes: 0 additions & 2 deletions users/views/users_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from django import forms
from django.conf import settings
from django.utils.translation import gettext_lazy as _
from django.contrib.auth.hashers import check_password

from ..models import User, UserProfile
from .validators import (
LoginVerificationEmailValidator,
Expand Down

0 comments on commit 4b84647

Please sign in to comment.