kopia lustrzana https://github.com/wagtail/wagtail
Ensure cloudfront purges are called with lists
rodzic
6b44838841
commit
62d2d78f17
|
@ -72,7 +72,7 @@ class CloudfrontBackend(BaseBackend):
|
|||
paths_by_distribution_id[distribution_id].add(url_parsed.path)
|
||||
|
||||
for distribution_id, paths in paths_by_distribution_id.items():
|
||||
self._create_invalidation(distribution_id, paths)
|
||||
self._create_invalidation(distribution_id, list(paths))
|
||||
|
||||
def purge(self, url):
|
||||
self.purge_batch([url])
|
||||
|
|
|
@ -360,7 +360,7 @@ class TestBackendConfiguration(SimpleTestCase):
|
|||
backends.get("cloudfront").purge("http://torchbox.com/blog/")
|
||||
|
||||
_create_invalidation.assert_called_once_with(
|
||||
"frontend", {"/home/events/christmas/"}
|
||||
"frontend", ["/home/events/christmas/"]
|
||||
)
|
||||
|
||||
self.assertTrue(
|
||||
|
|
Ładowanie…
Reference in New Issue