diff options
author | Eric Sabouraud <esabouraud@users.noreply.github.com> | 2018-06-11 21:23:57 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-06-11 21:23:57 +0200 |
commit | 2c22a34ef68da190520fac4b326144061898e0cc (patch) | |
tree | cb33bd3aa0c7017651f8c3c665baa5ab85f320e9 /gitlab/v4/cli.py | |
parent | 617aa64c8066ace4be4bbc3f510f27d3a0519daf (diff) | |
download | gitlab-2c22a34ef68da190520fac4b326144061898e0cc.tar.gz |
Add project push rules configuration (#520)
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r-- | gitlab/v4/cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py index 0e50de1..451bec8 100644 --- a/gitlab/v4/cli.py +++ b/gitlab/v4/cli.py @@ -143,8 +143,9 @@ def _populate_sub_parser_by_class(cls, sub_parser): action='store_true') if action_name == 'delete': - id_attr = cls._id_attr.replace('_', '-') - sub_parser_action.add_argument("--%s" % id_attr, required=True) + if cls._id_attr is not None: + id_attr = cls._id_attr.replace('_', '-') + sub_parser_action.add_argument("--%s" % id_attr, required=True) if action_name == "get": if gitlab.mixins.GetWithoutIdMixin not in inspect.getmro(cls): |