From 6c21a1732c21cc7583485523ae156978a092325c Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 12 Aug 2020 10:13:16 +0100 Subject: [PATCH] Refactor to assign directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s no need for an intermediate variable here, and it’s confusing having two properties containing the same data. --- app/broadcast_areas/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/broadcast_areas/__init__.py b/app/broadcast_areas/__init__.py index 5f4338578..05775900b 100644 --- a/app/broadcast_areas/__init__.py +++ b/app/broadcast_areas/__init__.py @@ -119,9 +119,7 @@ class BroadcastAreaLibraries(SerialisedModelCollection, GetItemByIdMixin): model = BroadcastAreaLibrary def __init__(self): - - self.libraries = BroadcastAreasRepository().get_libraries() - self.items = self.libraries + self.items = BroadcastAreasRepository().get_libraries() def get_areas(self, *area_ids): # allow people to call `get_areas('a', 'b') or get_areas(['a', 'b'])`