From c1ea7946414431429096cebc866b38ba7a70f05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=86=D0=B2=D0=B0=D0=BD=20=D0=9D=D1=94=D0=B4=D1=94=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=96=D1=86=D0=B5=D0=B2?= Date: Thu, 25 Jul 2024 11:32:20 +0300 Subject: [PATCH] style: [FC-0047] refactor condition --- edx_ace/channel/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/edx_ace/channel/__init__.py b/edx_ace/channel/__init__.py index 4efc162..0472b34 100644 --- a/edx_ace/channel/__init__.py +++ b/edx_ace/channel/__init__.py @@ -195,4 +195,7 @@ def get_channel_for_message(channel_type, message): return channel # Else the normal path: use the preferred channel for this message type - return possible_channels[0] if possible_channels else channels_map.get_default_channel(channel_type) + if possible_channels: + return possible_channels[0] + else: + return channels_map.get_default_channel(channel_type)