Skip to content

Commit e65dfa3

Browse files
author
Gauvain Pocentek
committed
[cli] _id_attr is required on creation
1 parent 5e27bc4 commit e65dfa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab/v4/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ def _populate_sub_parser_by_class(cls, sub_parser):
154154
if hasattr(mgr_cls, '_create_attrs'):
155155
[sub_parser_action.add_argument("--%s" % x.replace('_', '-'),
156156
required=True)
157-
for x in mgr_cls._create_attrs[0] if x != cls._id_attr]
157+
for x in mgr_cls._create_attrs[0]]
158158

159159
[sub_parser_action.add_argument("--%s" % x.replace('_', '-'),
160160
required=False)
161-
for x in mgr_cls._create_attrs[1] if x != cls._id_attr]
161+
for x in mgr_cls._create_attrs[1]]
162162

163163
if action_name == "update":
164164
if cls._id_attr is not None:

0 commit comments

Comments
 (0)