mirror of
https://github.com/ansible/awx.git
synced 2026-03-05 02:31:03 -03:30
Null value handling, discovered in production logs (#16323)
This commit is contained in:
@@ -393,9 +393,9 @@ def evaluate_policy(instance):
|
||||
raise PolicyEvaluationError(_('Following certificate settings are missing for OPA_AUTH_TYPE=Certificate: {}').format(cert_settings_missing))
|
||||
|
||||
query_paths = [
|
||||
('Organization', instance.organization.opa_query_path),
|
||||
('Inventory', instance.inventory.opa_query_path),
|
||||
('Job template', instance.job_template.opa_query_path),
|
||||
('Organization', instance.organization.opa_query_path if instance.organization else None),
|
||||
('Inventory', instance.inventory.opa_query_path if instance.inventory else None),
|
||||
('Job template', instance.job_template.opa_query_path if instance.job_template else None),
|
||||
]
|
||||
violations = dict()
|
||||
errors = dict()
|
||||
|
||||
@@ -55,6 +55,8 @@ def construct_rsyslog_conf_template(settings=settings):
|
||||
)
|
||||
|
||||
def escape_quotes(x):
|
||||
if x is None:
|
||||
return ''
|
||||
return x.replace('"', '\\"')
|
||||
|
||||
if not enabled:
|
||||
|
||||
Reference in New Issue
Block a user