Skip to content

Commit

Permalink
Fix empty list/dict check configs (#44)
Browse files Browse the repository at this point in the history
* Handle common and application configs
* Handle enable_sso config

Signed-off-by: Chris Perro <[email protected]>
  • Loading branch information
cmperro authored Apr 4, 2022
1 parent 6f293c2 commit d5dd113
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cdpy/dw.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ def create_vw(self, cluster_id:str, dbc_id:str, vw_type:str, name:str, template:

if any(x is not None for x in [common_configs, application_configs, ldap_groups, enable_sso]):
config = {}
if common_configs is not None and not common_configs:
if common_configs is not None and common_configs:
config['commonConfigs'] = common_configs
if application_configs is not None and not application_configs:
if application_configs is not None and application_configs:
config['applicationConfigs'] = application_configs
if ldap_groups is not None and not ldap_groups:
if ldap_groups is not None and ldap_groups:
config['ldapGroups'] = ldap_groups
if enable_sso is not None:
config['enableSSO'] = enable_sso
Expand Down

0 comments on commit d5dd113

Please sign in to comment.