Skip to content

Commit

Permalink
Fix invalidate_page_cache management command
Browse files Browse the repository at this point in the history
This change fixes the `invalidate_page_cache` management command after the changes for Wagtail 6.2 in #8522.
  • Loading branch information
willbarton committed Sep 9, 2024
1 parent 23d71b1 commit 716aa20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 1 addition & 5 deletions cfgov/cdntools/management/commands/invalidate_page_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@ def add_arguments(self, parser):

def handle(self, *args, **options):
batch = PurgeBatch()
batch.add_urls(
[
options["url"],
]
)
batch.add_urls(options["url"])
batch.purge()
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
)
class InvalidatePageTestCase(TestCase):
def test_submission_with_url(self):
call_command("invalidate_page_cache", url="https://server/foo/bar")
call_command(
"invalidate_page_cache",
url=[
"https://server/foo/bar",
],
)
self.assertIn("https://server/foo/bar", MOCK_PURGED)

0 comments on commit 716aa20

Please sign in to comment.