Skip to content

Commit

Permalink
Update views.py as per comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnarang95 authored Mar 6, 2024
1 parent 9c85627 commit 804242b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions djangocms_navigation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
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


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

Check failure on line 42 in djangocms_navigation/views.py

View workflow job for this annotation

GitHub Actions / flake8

whitespace after '['

Check failure on line 42 in djangocms_navigation/views.py

View workflow job for this annotation

GitHub Actions / flake8

whitespace before ']'

Check failure on line 42 in djangocms_navigation/views.py

View workflow job for this annotation

GitHub Actions / flake8

whitespace after '['

Check failure on line 42 in djangocms_navigation/views.py

View workflow job for this annotation

GitHub Actions / flake8

whitespace before ']'
]

data = {
Expand Down

0 comments on commit 804242b

Please sign in to comment.