diff --git a/gitlab/tests/test_types.py b/gitlab/tests/test_types.py index f84eddbb0..a2e5ff5b3 100644 --- a/gitlab/tests/test_types.py +++ b/gitlab/tests/test_types.py @@ -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" diff --git a/gitlab/types.py b/gitlab/types.py index e07d078e1..0495c972c 100644 --- a/gitlab/types.py +++ b/gitlab/types.py @@ -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):
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: