8000 Merge pull request #72 from pa4373/newuser-confirm-fix · guyzmo/python-gitlab@d069381 · GitHub
[go: up one dir, main page]

Skip to content

Commit d069381

Browse files
author
Gauvain Pocentek
committed
Merge pull request python-gitlab#72 from pa4373/newuser-confirm-fix
Can bypassing confirm when creating new user now
2 parents f07de94 + a0fe68b commit d069381

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gitlab/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,13 @@ class User(GitlabObject):
854854
requiredCreateAttrs = ['email', 'username', 'name']
855855
optionalCreateAttrs = ['password', 'skype', 'linkedin', 'twitter',
856856
'projects_limit', 'extern_uid', 'provider',
857-
'bio', 'admin', 'can_create_group', 'website_url']
857+
'bio', 'admin', 'can_create_group', 'website_url',
858+
'confirm']
859+
860+
def _data_for_gitlab(self, extra_parameters={}):
861+
if hasattr(self, 'confirm'):
862+
self.confirm = str(self.confirm).lower()
863+
return super(User, self)._data_for_gitlab(extra_parameters)
858864

859865
def Key(self, id=None, **kwargs):
860866
return UserKey._get_list_or_object(self.gitlab, id,

0 commit comments

Comments
 (0)
0