Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
reduced characters in line
  • Loading branch information
vipulnarang95 authored Dec 7, 2023
1 parent bb93ec8 commit 86928aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion djangocms_navigation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def get(self, request, *args, **kwargs):

# Removing unpublished pages from queryset
if model == Page:
queryset_data = [page for page in queryset_data if page.get_title_obj().versions.first().state != 'unpublished']
queryset_data = [
page for page in queryset_data if page.get_title_obj().versions.first().state != 'unpublished'
]

data = {
"results": [{"text": str(obj), "id": obj.pk} for obj in queryset_data]
Expand Down

0 comments on commit 86928aa

Please sign in to comment.