diff options
| author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2017-12-16 14:40:01 +0100 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2017-12-16 14:40:01 +0100 |
| commit | 0a38143da076bd682619396496fefecf0286e4a9 (patch) | |
| tree | 9cc3e5642c5aaa5dcc9ff34caf3c304b510ee067 /gitlab/v4 | |
| parent | 6f36f707cfaafc6e565aad14346d01d637239f79 (diff) | |
| download | gitlab-0a38143da076bd682619396496fefecf0286e4a9.tar.gz | |
ProjectFile.create(): don't modify the input data
Fixes #394
Diffstat (limited to 'gitlab/v4')
| -rw-r--r-- | gitlab/v4/objects.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 6cb2115..78a3b25 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -1709,9 +1709,10 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin, """ self._check_missing_create_attrs(data) - file_path = data.pop('file_path').replace('/', '%2F') + new_data = data.copy() + file_path = new_data.pop('file_path').replace('/', '%2F') path = '%s/%s' % (self.path, file_path) - server_data = self.gitlab.http_post(path, post_data=data, **kwargs) + server_data = self.gitlab.http_post(path, post_data=new_data, **kwargs) return self._obj_cls(self, server_data) @exc.on_http_error(exc.GitlabUpdateError) |
