diff options
Diffstat (limited to 'gitlab/mixins.py')
-rw-r--r-- | gitlab/mixins.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/mixins.py b/gitlab/mixins.py index 8544499..dde11d0 100644 --- a/gitlab/mixins.py +++ b/gitlab/mixins.py @@ -170,7 +170,7 @@ class CreateMixin(object): return getattr(self, "_create_attrs", (tuple(), tuple())) @exc.on_http_error(exc.GitlabCreateError) - def create(self, data, **kwargs): + def create(self, data=None, **kwargs): """Create a new object. Args: @@ -186,6 +186,9 @@ class CreateMixin(object): GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the server cannot perform the request """ + if data is None: + data = {} + self._check_missing_create_attrs(data) files = {} |