Skip to content

Commit

Permalink
fix: better null checks on cfg[value] in edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
bodom0015 committed Apr 24, 2023
1 parent b64df32 commit 381254c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def create_userapp(username, userapp, spec_map):
configmap_data[cfg['name']] = cfg['value'] if 'value' in cfg else ''
if ('isPassword' in cfg and cfg['isPassword']) and \
('canOverride' in cfg and cfg['canOverride']) and \
not cfg['value']:
('value' not in cfg or not cfg['value']):
# generate password if none is provided
configmap_data[cfg['name']] = generate_random_password()
else:
Expand Down

0 comments on commit 381254c

Please sign in to comment.