From e104e213b16ca702f33962d770784f045f36cf10 Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Wed, 18 Dec 2019 12:13:47 +0100 Subject: fix(projects): adjust snippets to match the API --- gitlab/v4/objects.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 65be16d..88ede56 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -3667,8 +3667,11 @@ class ProjectSnippetManager(CRUDMixin, RESTManager): _path = "/projects/%(project_id)s/snippets" _obj_cls = ProjectSnippet _from_parent_attrs = {"project_id": "id"} - _create_attrs = (("title", "file_name", "code"), ("lifetime", "visibility")) - _update_attrs = (tuple(), ("title", "file_name", "code", "visibility")) + _create_attrs = (("title", "file_name", "content", "visibility"), ("description",)) + _update_attrs = ( + tuple(), + ("title", "file_name", "content", "visibility", "description"), + ) class ProjectTrigger(SaveMixin, ObjectDeleteMixin, RESTObject): -- cgit v1.2.1