Skip to content

Commit

Permalink
Export resource_class_map and fix bug in Role.add_user() (pycontribs#…
Browse files Browse the repository at this point in the history
…1047)

The reason for exporting resource_class_map is to allow an external module to support additional resource types without the need to edit resources.py (I had edited it previously but this became a maintenance nightmare).

The Role.add_user() bug is (I hope) an obvious one: the groups argument was ignored.
  • Loading branch information
wlupton authored and svermeulen committed Oct 31, 2021
1 parent 4ae83df commit 5096268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jira/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"Customer",
"ServiceDesk",
"RequestType",
"resource_class_map",
)

logging.getLogger("jira").addHandler(logging.NullHandler())
Expand Down Expand Up @@ -960,7 +961,7 @@ def add_user(
if groups is not None and isinstance(groups, str):
groups = (groups,)

data = {"user": users} # FIXME: groups is not used.
data = {"user": users, "group": groups}
self._session.post(self.self, data=json.dumps(data))


Expand Down

0 comments on commit 5096268

Please sign in to comment.