Remove redundant 'filter' and return value

'None' is the implicit return value. Since the filter was operating
on a yield that never yield 'None', it was redundant.
This commit is contained in:
Ben Thorner
2021-08-23 16:35:38 +01:00
parent a50b77d52c
commit 1923c5edb1

View File

@@ -125,7 +125,7 @@ class BroadcastArea(BaseBroadcastArea, SortableMixin):
@cached_property
def parents(self):
return list(filter(None, self._parents_iterator))
return list(self._parents_iterator)
@property
def _parents_iterator(self):
@@ -135,7 +135,7 @@ class BroadcastArea(BaseBroadcastArea, SortableMixin):
parent = BroadcastAreasRepository().get_parent_for_area(id)
if not parent:
return None
return
parent_broadcast_area = BroadcastArea(parent)