From c694529d2d8dd0aea52f0da6675dd1d78c00b3f5 Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Wed, 8 Sep 2021 15:22:40 +0100 Subject: [PATCH] Fix incorrect log message for dodgy broadcasts This was logging the number of keys in the whole JSON blob, rather than the number of IDs specified within it. --- app/models/broadcast_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/broadcast_message.py b/app/models/broadcast_message.py index c5d334e4c..3385ccc08 100644 --- a/app/models/broadcast_message.py +++ b/app/models/broadcast_message.py @@ -102,7 +102,7 @@ class BroadcastMessage(JSONModel): # which isn't great as our code doesn't support editing its # areas, but we don't expect this to happen often current_app.logger.warn( - f'BroadcastMessage has {len(self._dict["areas"])} areas ' + f'BroadcastMessage has {len(self.area_ids)} area IDs ' f'but {len(library_areas)} found in the library. Treating ' f'{self.id} as a custom broadcast.' )