mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 06:38:26 -04:00
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:
@@ -125,7 +125,7 @@ class BroadcastArea(BaseBroadcastArea, SortableMixin):
|
|||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def parents(self):
|
def parents(self):
|
||||||
return list(filter(None, self._parents_iterator))
|
return list(self._parents_iterator)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _parents_iterator(self):
|
def _parents_iterator(self):
|
||||||
@@ -135,7 +135,7 @@ class BroadcastArea(BaseBroadcastArea, SortableMixin):
|
|||||||
parent = BroadcastAreasRepository().get_parent_for_area(id)
|
parent = BroadcastAreasRepository().get_parent_for_area(id)
|
||||||
|
|
||||||
if not parent:
|
if not parent:
|
||||||
return None
|
return
|
||||||
|
|
||||||
parent_broadcast_area = BroadcastArea(parent)
|
parent_broadcast_area = BroadcastArea(parent)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user