Changing this: message_record = {'project_id': context.project_id, 'request_id': context.request_id, 'resource_type': resource_type, 'resource_uuid': resource_uuid, 'action_id': action[0] if action else '', 'message_level': level, 'event_id': "VOLUME_%s_%s_%s" % (resource_type, action[0], detail_id), 'detail_id': detail_id, 'expires_at': expires_at}
to following fixes the issue:
action_id = action[0] if action else '' message_record = {'project_id': context.project_id, 'request_id': context.request_id, 'resource_type': resource_type, 'resource_uuid': resource_uuid, 'action_id': action_id, 'message_level': level, 'event_id': "VOLUME_%s_%s_%s" % (resource_type, action_id, detail_id), 'detail_id': detail_id, 'expires_at': expires_at}
Changing this:
message_ record = {'project_id': context.project_id,
'request_ id': context.request_id,
'resource_ type': resource_type,
'resource_ uuid': resource_uuid,
'action_ id': action[0] if action else '',
'message_ level': level,
'event_ id': "VOLUME_%s_%s_%s" % (resource_type,
action[ 0],
detail_ id),
'detail_ id': detail_id,
'expires_ at': expires_at}
to following fixes the issue:
action_id = action[0] if action else ''
message_ record = {'project_id': context.project_id,
'request_ id': context.request_id,
'resource_ type': resource_type,
'resource_ uuid': resource_uuid,
'action_ id': action_id,
'message_ level': level,
'event_ id': "VOLUME_%s_%s_%s" % (resource_type,
action_ id,
detail_ id),
'detail_ id': detail_id,
'expires_ at': expires_at}