Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnarang95 authored Mar 6, 2024
1 parent 804242b commit 2594cba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions djangocms_navigation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
from cms.models import Page
from cms.utils import get_current_site, get_language_from_request

from djangocms_navigation.utils import is_model_supported, supported_models
from djangocms_versioning.constants import ARCHIVED, UNPUBLISHED

from djangocms_navigation.utils import is_model_supported, supported_models


class ContentObjectSelect2View(View):
menu_content_model = None
Expand Down Expand Up @@ -39,7 +40,7 @@ def get(self, request, *args, **kwargs):
if model == Page:
queryset_data = [
page for page in queryset_data
if not getattr(page.get_title_obj().versions.first(), "state", None) in [ ARCHIVED, UNPUBLISHED ]
if not getattr(page.get_title_obj().versions.first(), "state", None) in [ARCHIVED, UNPUBLISHED]
]

data = {
Expand Down

0 comments on commit 2594cba

Please sign in to comment.