mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Add function method to aggregate areas
This is standalone for now - we'll plumb it in later.
This commit is contained in:
@@ -127,6 +127,10 @@ class BroadcastArea(BaseBroadcastArea, SortableMixin):
|
||||
def ancestors(self):
|
||||
return list(self._ancestors_iterator)
|
||||
|
||||
@cached_property
|
||||
def parent(self):
|
||||
return next(iter(self.ancestors), None)
|
||||
|
||||
@property
|
||||
def _ancestors_iterator(self):
|
||||
id = self.id
|
||||
|
||||
Reference in New Issue
Block a user