mirror of https://github.com/MISP/PyMISP
re-naming variables to make tests happy.
parent
2665aff327
commit
4e85c93a9f
|
@ -2706,9 +2706,9 @@ class PyMISP:
|
||||||
role_j = self._check_json_response(r)
|
role_j = self._check_json_response(r)
|
||||||
if not (self.global_pythonify or pythonify) or 'errors' in role_j:
|
if not (self.global_pythonify or pythonify) or 'errors' in role_j:
|
||||||
return role_j
|
return role_j
|
||||||
r = MISPRole()
|
new_misp_role = MISPRole()
|
||||||
r.from_dict(**role_j)
|
new_misp_role.from_dict(**role_j)
|
||||||
return r
|
return new_misp_role
|
||||||
|
|
||||||
def update_role(self, role: MISPRole, role_id: int | None = None, pythonify: bool = False) -> dict[str, Any] | MISPRole:
|
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
|
"""Update a role on a MISP instance
|
||||||
|
@ -2726,9 +2726,9 @@ class PyMISP:
|
||||||
updated_role = self._check_json_response(r)
|
updated_role = self._check_json_response(r)
|
||||||
if not (self.global_pythonify or pythonify) or 'errors' in updated_role:
|
if not (self.global_pythonify or pythonify) or 'errors' in updated_role:
|
||||||
return updated_role
|
return updated_role
|
||||||
e = MISPRole()
|
updated_misp_role = MISPRole()
|
||||||
e.from_dict(**updated_role)
|
updated_misp_role.from_dict(**updated_role)
|
||||||
return e
|
return updated_misp_role
|
||||||
|
|
||||||
def set_default_role(self, role: MISPRole | int | str | UUID) -> dict[str, Any] | list[dict[str, Any]]:
|
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
|
"""Set a default role for the new user accounts
|
||||||
|
|
Loading…
Reference in New Issue