Skip to content

Commit

Permalink
added remove for sites content with type website for unpublished or n…
Browse files Browse the repository at this point in the history
…ot downloadable sites
  • Loading branch information
umar8hassan committed Sep 20, 2024
1 parent 84bc032 commit 63b241a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content_sync/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ def update_websites_in_root_website():
sites = get_publishable_sites(is_offline=True)
# Exclude the root website
sites = sites.exclude(name=settings.ROOT_WEBSITE_NAME)

# Remove the content for unpublished or not downloadable sites
WebsiteContent.objects.exclude(website__in=sites).delete()

fields = [
"website",
"type",
Expand Down

0 comments on commit 63b241a

Please sign in to comment.