We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5b81d7d + 115938b commit dde01c7Copy full SHA for dde01c7
gitlab/tests/test_types.py
@@ -59,6 +59,11 @@ def test_list_attribute_get_for_api_from_list():
59
assert o.get_for_api() == "foo,bar,baz"
60
61
62
+def test_list_attribute_get_for_api_from_int_list():
63
+ o = types.ListAttribute([1, 9, 7])
64
+ assert o.get_for_api() == "1,9,7"
65
+
66
67
def test_list_attribute_does_not_split_string():
68
o = types.ListAttribute("foo")
69
assert o.get_for_api() == "foo"
gitlab/types.py
@@ -42,7 +42,7 @@ def get_for_api(self):
42
if isinstance(self._value, str):
43
return self._value
44
45
- return ",".join(self._value)
+ return ",".join([str(x) for x in self._value])
46
47
48
class LowercaseStringAttribute(GitlabAttribute):
0 commit comments