Fixe cloudfront_distribution module issue #45043 (#49434)

pull/56012/head
Stefan Horning 6 years ago committed by Jill R
parent f37476e247
commit 7cf0626d7b

@ -1761,12 +1761,11 @@ class CloudFrontValidationManager(object):
distribution_config_name = 'DistributionConfig' distribution_config_name = 'DistributionConfig'
distribution_ids = [dist.get('Id') for dist in distributions] distribution_ids = [dist.get('Id') for dist in distributions]
for distribution_id in distribution_ids: for distribution_id in distribution_ids:
config = self.__cloudfront_facts_mgr.get_distribution(distribution_id) distribution = self.__cloudfront_facts_mgr.get_distribution(distribution_id)
distribution = config.get(distribution_name)
if distribution is not None: if distribution is not None:
distribution_config = distribution.get(distribution_config_name) distribution_config = distribution[distribution_name].get(distribution_config_name)
if distribution_config is not None and distribution_config.get('CallerReference') == caller_reference: if distribution_config is not None and distribution_config.get('CallerReference') == caller_reference:
distribution['DistributionConfig'] = distribution_config distribution[distribution_name][distribution_config_name] = distribution_config
return distribution return distribution
except Exception as e: except Exception as e:

Loading…
Cancel
Save