Skip to content

Commit

Permalink
feat: skip choice type without choices
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Sep 30, 2024
1 parent ae82cfc commit e7d212f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lean/models/json_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from lean.constants import MODULE_TYPE, MODULE_PLATFORM, MODULE_CLI_PLATFORM
from lean.container import container
from lean.models.configuration import BrokerageEnvConfiguration, Configuration, InternalInputUserInput, \
PathParameterUserInput, AuthConfiguration
PathParameterUserInput, AuthConfiguration, ChoiceUserInput
from copy import copy
from abc import ABC

Expand Down Expand Up @@ -211,6 +211,9 @@ def config_build(self,
_logged_messages.add(log_message)
if type(configuration) is InternalInputUserInput:
continue
if isinstance(configuration, ChoiceUserInput) and len(configuration._choices) == 0:
logger.debug(f"skipping configuration '{configuration._id}': no choices available.")
continue
elif isinstance(configuration, AuthConfiguration):
auth_authorizations = get_authorization(container.api_client.auth0, self._display_name.lower(), logger)
logger.debug(f'auth: {auth_authorizations}')
Expand Down

0 comments on commit e7d212f

Please sign in to comment.