From 1ec1816d7c76ae079ad3b3e3b7a1bae70e0dd95b Mon Sep 17 00:00:00 2001 From: Mateusz Filipowicz Date: Wed, 5 Feb 2020 15:26:06 +0100 Subject: fix: remove null values from features POST data, because it fails with HTTP 500 --- gitlab/utils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gitlab/utils.py') 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} -- cgit v1.2.1