Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gitlab/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def test_list_attribute_get_for_api_from_list():
assert o.get_for_api() == "foo,bar,baz"


def test_list_attribute_get_for_api_from_int_list():
o = types.ListAttribute([1, 9, 7])
assert o.get_for_api() == "1,9,7"


def test_list_attribute_does_not_split_string():
o = types.ListAttribute("foo")
assert o.get_for_api() == "foo"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_for_api(self):
if isinstance(self._value, str):
return self._value

return ",".join(self._value)
return ",".join([str(x) for x in self._value])


class LowercaseStringAttribute(GitlabAttribute):
Expand Down