Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to the Trash #8604

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cfgov/teachers_digital_platform/models/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ class ActivityPageHandoutDocuments(Orderable):
class ActivityPage(CFGOVPage):
"""A model for the Activity Detail page."""

# Allow Activity pages to exist under the ActivityIndexPage or the Trash
parent_page_types = ["ActivityIndexPage", "v1.HomePage"]
parent_page_types = ["ActivityIndexPage"]
subpage_types = []

date = models.DateField("Updated", default=timezone.now)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def test_can_not_create_an_activity_page_under_home_page(self):
self.assertCanNotCreateAt(ActivityPage, HomePage)

def test_activity_page_parent_pages(self):
self.assertAllowedParentPageTypes(
ActivityPage, {ActivityIndexPage, HomePage}
)
self.assertAllowedParentPageTypes(ActivityPage, {ActivityIndexPage})

def test_can_create_activity_index_page(self):
root_page = HomePage.objects.first()
Expand Down
5 changes: 2 additions & 3 deletions cfgov/v1/models/filterable_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ def get_search_class():
return FilterablePagesDocumentSearch

def get_filterable_search(self):
# If searching globally, use the root page of this page's Wagtail
# Site. If the page doesn't live under a Site (for example, it is
# in the Trash), use the default Site.
# If searching globally, use the root page of this page's Wagtail Site.
# If the page doesn't live under a Site, use the default Site.
if not self.filter_children_only:
site = self.get_site()

Expand Down
Loading