Skip to content

Commit d5dd113

Browse files
authored
Fix empty list/dict check configs (#44)
* Handle common and application configs * Handle enable_sso config Signed-off-by: Chris Perro <[email protected]>
1 parent 6f293c2 commit d5dd113

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cdpy/dw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ def create_vw(self, cluster_id:str, dbc_id:str, vw_type:str, name:str, template:
120120

121121
if any(x is not None for x in [common_configs, application_configs, ldap_groups, enable_sso]):
122122
config = {}
123-
if common_configs is not None and not common_configs:
123+
if common_configs is not None and common_configs:
124124
config['commonConfigs'] = common_configs
125-
if application_configs is not None and not application_configs:
125+
if application_configs is not None and application_configs:
126126
config['applicationConfigs'] = application_configs
127-
if ldap_groups is not None and not ldap_groups:
127+
if ldap_groups is not None and ldap_groups:
128128
config['ldapGroups'] = ldap_groups
129129
if enable_sso is not None:
130130
config['enableSSO'] = enable_sso

0 commit comments

Comments
 (0)