From 863d2fab7e78d2eb291671b5e4aad808a984f368 Mon Sep 17 00:00:00 2001 From: Damego Date: Wed, 3 Aug 2022 14:16:21 +0500 Subject: [PATCH 1/3] fix: fix converting empty list to actionrow --- interactions/client/models/component.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interactions/client/models/component.py b/interactions/client/models/component.py index 0da8f57b1..e5f9e67a4 100644 --- a/interactions/client/models/component.py +++ b/interactions/client/models/component.py @@ -417,4 +417,4 @@ def __check_components(): if _components: return _components else: - return __check_components() + return __check_components() if _components else _components From 290c58551bb955f5194f1bc174553fe8bf2a0b40 Mon Sep 17 00:00:00 2001 From: Damego Date: Wed, 3 Aug 2022 14:25:34 +0500 Subject: [PATCH 2/3] move check --- interactions/client/models/component.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interactions/client/models/component.py b/interactions/client/models/component.py index e5f9e67a4..54577ea70 100644 --- a/interactions/client/models/component.py +++ b/interactions/client/models/component.py @@ -411,10 +411,12 @@ def __check_components(): raise LibraryException( 11, message="The specified components are invalid and could not be created!" ) + if not components: + return components _components = __check_action_row() if _components: return _components else: - return __check_components() if _components else _components + return __check_components() From 53577607883d2098c596af35b8e21c5300b9258a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Aug 2022 09:26:56 +0000 Subject: [PATCH 3/3] ci: correct from checks. --- interactions/client/models/component.py | 1 + 1 file changed, 1 insertion(+) diff --git a/interactions/client/models/component.py b/interactions/client/models/component.py index 54577ea70..4ac31c2e0 100644 --- a/interactions/client/models/component.py +++ b/interactions/client/models/component.py @@ -411,6 +411,7 @@ def __check_components(): raise LibraryException( 11, message="The specified components are invalid and could not be created!" ) + if not components: return components