diff options
author | Mateusz Filipowicz <mateusz.filipowicz@roche.com> | 2020-02-05 15:26:06 +0100 |
---|---|---|
committer | Mateusz Filipowicz <mateusz.filipowicz@roche.com> | 2020-02-07 11:00:18 +0100 |
commit | 1ec1816d7c76ae079ad3b3e3b7a1bae70e0dd95b (patch) | |
tree | 20a78c9ea8d2907bd3fbe83bb8b32db7dce4b5e5 /gitlab/utils.py | |
parent | 7f192b4f8734e29a63f1c79be322c25d45cfe23f (diff) | |
download | gitlab-1ec1816d7c76ae079ad3b3e3b7a1bae70e0dd95b.tar.gz |
fix: remove null values from features POST data, because it fails
with HTTP 500
Diffstat (limited to 'gitlab/utils.py')
-rw-r--r-- | gitlab/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gitlab/utils.py b/gitlab/utils.py index 0992ed7..4241787 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -55,3 +55,7 @@ def sanitized_url(url): parsed = urlparse(url) new_path = parsed.path.replace(".", "%2E") return parsed._replace(path=new_path).geturl() + + +def remove_none_from_dict(data): + return {k: v for k, v in data.items() if v is not None} |