Make overlapping_areas a cached property

It’s quite expensive to calculate and there’s no guarantee we’ll only use it once.
This commit is contained in:
Chris Hill-Scott
2021-08-06 10:11:24 +01:00
parent 5e1b96a3a7
commit de364bba3c

View File

@@ -164,7 +164,7 @@ class CustomBroadcastArea(BaseBroadcastArea):
simple_polygons = polygons
@property
@cached_property
def overlapping_areas(self):
if not self.polygons:
return []