Add checking audit state
This patch adds checking audit state when updating an existing audit in accordance with audit state machine. Closes-Bug: #1662406 Change-Id: I20610c83169b77f141974a5cebe33818a4bf0728
This commit is contained in:
@@ -73,6 +73,12 @@ def apply_jsonpatch(doc, patch):
|
||||
return jsonpatch.apply_patch(doc, jsonpatch.JsonPatch(patch))
|
||||
|
||||
|
||||
def get_patch_value(patch, key):
|
||||
for p in patch:
|
||||
if p['op'] == 'replace' and p['path'] == '/%s' % key:
|
||||
return p['value']
|
||||
|
||||
|
||||
def as_filters_dict(**filters):
|
||||
filters_dict = {}
|
||||
for filter_name, filter_value in filters.items():
|
||||
|
||||
Reference in New Issue
Block a user