Skip to content

Commit 31e1a5d

Browse files
committed
Resolve body payload generation issue with the userActionV1 operation
1 parent 5c7f81c commit 31e1a5d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/falconpy/user_management.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,11 @@ def user_action(self: object, body: dict = None, **kwargs) -> Union[Dict[str, Un
344344
body = generic_payload_list(submitted_keywords=kwargs,
345345
payload_value="ids"
346346
)
347-
body["action"] = {
348-
"action_name": kwargs.get("action_name", "reset_password"),
349-
"action_value": kwargs.get("action_value", "")
350-
}
347+
body["action"] = {}
348+
if kwargs.get("action_name", None):
349+
body["action"]["action_name"] = kwargs.get("action_name", "reset_password")
350+
if kwargs.get("action_value", None):
351+
body["action"]["action_value"] = kwargs.get("action_value", "")
351352

352353
return process_service_request(
353354
calling_object=self,

0 commit comments

Comments
 (0)