Merge "Fix exception error when creating audit without audit template"

This commit is contained in:
Jenkins 2017-04-19 13:20:56 +00:00 committed by Gerrit Code Review
commit 3e5ad22b60

View File

@ -82,7 +82,7 @@ class CreateForm(forms.SelfHandlingForm):
def handle(self, request, data):
try:
params = {'audit_template_uuid': data['audit_template']}
params = {'audit_template_uuid': data.get('audit_template')}
params['audit_type'] = data['audit_type'].upper()
params['auto_trigger'] = data['auto_trigger']
if data['audit_type'] == 'continuous':