@@ -174,14 +174,8 @@ def _send_create_decision(self, url, data, action, reasoning, policy_uuids):
174
174
** data ,
175
175
'reasoning' : self .get_str (reasoning ),
176
176
'policy_uuids' : policy_uuids ,
177
- ** (
178
- {
179
- 'enforcement_actions_slugs' : [action ],
180
- 'enforcement_actions_update_strategy' : 'set' ,
181
- }
182
- if action is not None
183
- else {}
184
- ),
177
+ 'enforcement_actions_slugs' : [action ],
178
+ 'enforcement_actions_update_strategy' : 'set' ,
185
179
}
186
180
response = requests .post (url , json = data , headers = self .get_cinder_http_headers ())
187
181
response .raise_for_status ()
@@ -204,10 +198,7 @@ def create_job_decision(self, *, action, reasoning, policy_uuids, job_id):
204
198
205
199
def create_override_decision (self , * , action , reasoning , policy_uuids , decision_id ):
206
200
url = f'{ settings .CINDER_SERVER_URL } decisions/{ decision_id } /override/'
207
- # TODO: send action too once
208
- # https://lindie.app/share/6a21d831b39351d7c6fe898f6d22619af62dde98/PLAT-1834
209
- # implements the same parameters for overrides
210
- return self ._send_create_decision (url , {}, None , reasoning , policy_uuids )
201
+ return self ._send_create_decision (url , {}, action , reasoning , policy_uuids )
211
202
212
203
def close_job (self , * , job_id ):
213
204
url = f'{ settings .CINDER_SERVER_URL } jobs/{ job_id } /cancel'
0 commit comments