Skip to content

Commit

Permalink
[cli] _id_attr is required on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Mar 2, 2018
1 parent 5e27bc4 commit e65dfa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitlab/v4/cli.py
Expand Up @@ -154,11 +154,11 @@ def _populate_sub_parser_by_class(cls, sub_parser):
if hasattr(mgr_cls, '_create_attrs'):
[sub_parser_action.add_argument("--%s" % x.replace('_', '-'),
required=True)
for x in mgr_cls._create_attrs[0] if x != cls._id_attr]
for x in mgr_cls._create_attrs[0]]

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

if action_name == "update":
if cls._id_attr is not None:
Expand Down

0 comments on commit e65dfa3

Please sign in to comment.