#NEWLINE# @ log . log_method_call #NEWLINE# def delete_policy_action( self , context , policy_action_id ) : #NEWLINE# #INDENT# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# pa_db = self . _get_policy_action ( context , policy_action_id ) #NEWLINE# pa_ids = self . _get_policy_action_rules ( policy_action_id , policy_action_id ) #NEWLINE# if pa_ids : #NEWLINE# #INDENT# raise gpolicy . PolicyActionInUse ( policy_action_id = policy_action_id ) #NEWLINE# #UNINDENT# context . session . delete ( pa_db )