Skip to content
Snippets Groups Projects
Commit 8372d248 authored by jan.bednarik's avatar jan.bednarik
Browse files

district: Fix cache for geo feature pages

parent b27598b6
No related branches found
No related tags found
2 merge requests!487Release,!485district: Fix cache for geo feature pages
Pipeline #7868 passed
......@@ -1345,7 +1345,7 @@ class DistrictGeoFeatureDetailPage(
# delete all sibling index cache keys to force recompute
keys = [
make_feature_index_cache_key(feature)
for feature in self.get_siblings(inclusive=True)
for feature in self.get_siblings(inclusive=True).live()
]
cache.delete_many(keys)
return super().save(*args, **kwargs)
......@@ -1359,6 +1359,7 @@ class DistrictGeoFeatureDetailPage(
cached_index = (
list(
self.get_siblings(inclusive=True)
.live()
.order_by("districtgeofeaturedetailpage__sort_order")
.values_list("pk", flat=True)
).index(self.pk)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment