You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def content_expiry_site_alias_excluded_set(site, queryset):
"""
Filter ContentExpiry records to show only Alias objects available on a given site.
Model structure: Expiry->Version->Content->Alias->site
:param site: A site object to query against
:param queryset: A queryset object of ContentExpiry records
:return: A filtered list of Content Expiry records minus any none site PageContent models
"""
from djangocms_alias.models import AliasContent
alias_queryset = AliasContent._original_manager.exclude(Q(alias__site=site) | Q(alias__site__isnull=True))
alias_queryset.select_related('alias')
alias_content_ctype = ContentType.objects.get_for_model(AliasContent)
site_alias_contents = get_alias_content_site_objects(site)
queryset = queryset.exclude(
version__content_type=alias_content_ctype, version__object_id__in=site_alias_contents
)
return queryset
djangocms_content_expiry_changelist_queryset_filters = [
content_expiry_site_alias_excluded_set
]
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: