re-naming variables to make tests happy.

pull/1270/head
Tobias Mainka 2024-07-22 15:16:47 +02:00 committed by Raphaël Vinot
parent 448fe7a958
commit 49a72dd3cd
1 changed files with 6 additions and 6 deletions

View File

@ -2706,9 +2706,9 @@ class PyMISP:
role_j = self._check_json_response(r)
if not (self.global_pythonify or pythonify) or 'errors' in role_j:
return role_j
r = MISPRole()
r.from_dict(**role_j)
return r
new_misp_role = MISPRole()
new_misp_role.from_dict(**role_j)
return new_misp_role
def update_role(self, role: MISPRole, role_id: int | None = None, pythonify: bool = False) -> dict[str, Any] | MISPRole:
"""Update a role on a MISP instance
@ -2726,9 +2726,9 @@ class PyMISP:
updated_role = self._check_json_response(r)
if not (self.global_pythonify or pythonify) or 'errors' in updated_role:
return updated_role
e = MISPRole()
e.from_dict(**updated_role)
return e
updated_misp_role = MISPRole()
updated_misp_role.from_dict(**updated_role)
return updated_misp_role
def set_default_role(self, role: MISPRole | int | str | UUID) -> dict[str, Any] | list[dict[str, Any]]:
"""Set a default role for the new user accounts