Skip to content

Commit

Permalink
re-naming variables to make tests happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
neok0 committed Jul 22, 2024
1 parent 2665aff commit 4e85c93
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pymisp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2706,9 +2706,9 @@ def add_role(self, role: MISPRole, pythonify: bool = False) -> dict[str, Any] |
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
Expand All @@ -2726,9 +2726,9 @@ def update_role(self, role: MISPRole, role_id: int | None = None, pythonify: boo
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
Expand Down

0 comments on commit 4e85c93

Please sign in to comment.