Add fix for ONESHOT type

ONE_SHOT type has been renamed to ONESHOT
across the watcher-dashboard project.

Change-Id: I0f128dabaa4b4d266ef67c91a23ff905d3100794
Closes-Bug: #1573686
This commit is contained in:
Alexander Chadin 2016-04-27 17:15:39 +03:00
parent 9805c74188
commit fd7428ffd2
3 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class LaunchAudit(horizon.tables.BatchAction):
def action(self, request, obj_id):
params = {'audit_template_uuid': obj_id}
params['type'] = 'ONE_SHOT'
params['type'] = 'ONESHOT'
params['deadline'] = None
watcher.Audit.create(request, **params)

View File

@ -64,7 +64,7 @@ class CreateForm(forms.SelfHandlingForm):
def handle(self, request, data):
try:
params = {'audit_template_uuid': data['audit_template']}
params['type'] = 'ONE_SHOT'
params['type'] = 'ONESHOT'
params['deadline'] = None
audit = watcher.Audit.create(request, **params)
message = _('Audit was successfully created.')

View File

@ -75,7 +75,7 @@ def data(TEST):
audit_dict = {
'id': '22222222-2222-2222-2222-222222222222',
'deadline': None,
'type': 'ONE_SHOT',
'type': 'ONESHOT',
'audit_template_uuid': '11111111-1111-1111-1111-111111111111'
}
TEST.api_audits.add(audit_dict)