From 6f36f707cfaafc6e565aad14346d01d637239f79 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sat, 16 Dec 2017 14:06:03 +0100 Subject: submanagers: allow having undefined parameters This might happen in CLI context, where recursion to discover parent attributes is not required (URL gets hardcoded) Fix should fix the CLI CI. --- gitlab/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gitlab') diff --git a/gitlab/base.py b/gitlab/base.py index ec5f698..fd79c53 100644 --- a/gitlab/base.py +++ b/gitlab/base.py @@ -764,7 +764,7 @@ class RESTManager(object): if self._parent is None or not hasattr(self, '_from_parent_attrs'): return path - data = {self_attr: getattr(self._parent, parent_attr) + data = {self_attr: getattr(self._parent, parent_attr, None) for self_attr, parent_attr in self._from_parent_attrs.items()} self._parent_attrs = data return path % data -- cgit v1.2.1