summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/features.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-01-08 13:58:04 -0800
committerJohn L. Villalovos <john@sodarock.com>2022-01-08 13:58:04 -0800
commit8c17afafcc7d9d2a8fecb53b853c2b4f004c4121 (patch)
tree10193bc1178dab265df9cd8fa31cff278e6ad909 /gitlab/v4/objects/features.py
parentd45b59e800a14460a1ecdad2d750e42aa99bb96e (diff)
downloadgitlab-jlvillal/remove_replace.tar.gz
chore: remove custom URL encodingjlvillal/remove_replace
We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils.clean_str_id` which itself uses `urllib.parse.quote()` Closes: #1356
Diffstat (limited to 'gitlab/v4/objects/features.py')
-rw-r--r--gitlab/v4/objects/features.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitlab/v4/objects/features.py b/gitlab/v4/objects/features.py
index 2e92596..3078dd6 100644
--- a/gitlab/v4/objects/features.py
+++ b/gitlab/v4/objects/features.py
@@ -52,7 +52,8 @@ class FeatureManager(ListMixin, DeleteMixin, RESTManager):
Returns:
The created/updated attribute
"""
- path = f"{self.path}/{name.replace('/', '%2F')}"
+ name = utils.clean_str_id(name)
+ path = f"{self.path}/{name}"
data = {
"value": value,
"feature_group": feature_group,