diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-30 17:45:34 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-30 17:45:34 +0100 |
commit | 141f21a9982e3de54e8c8d6a5138cc08a91e1492 (patch) | |
tree | 5197ae460c30aa07f1e17bf9a5a0cb38ea4e79c5 /gitlab/cli.py | |
parent | 00ab7d00a553e68eea5668dbf455404925fef6e0 (diff) | |
download | gitlab-141f21a9982e3de54e8c8d6a5138cc08a91e1492.tar.gz |
Fix project update
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index 7fa176c..838bf07 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -106,14 +106,14 @@ def _populate_sub_parser_by_class(cls, sub_parser): required=True) attrs = (cls.requiredUpdateAttrs - if cls.requiredUpdateAttrs is not None + if (cls.requiredUpdateAttrs or cls.optionalUpdateAttrs) else cls.requiredCreateAttrs) [sub_parser_action.add_argument("--%s" % x.replace('_', '-'), required=True) for x in attrs if x != cls.idAttr] attrs = (cls.optionalUpdateAttrs - if cls.optionalUpdateAttrs is not None + if (cls.requiredUpdateAttrs or cls.optionalUpdateAttrs) else cls.optionalCreateAttrs) [sub_parser_action.add_argument("--%s" % x.replace('_', '-'), required=False) |