Skip to content

Commit 05b3abf

Browse files
author
Gauvain Pocentek
committed
Some objects need getRequires to be set to False
1 parent 18415fe commit 05b3abf

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

gitlab/objects.py

+3
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ class CurrentUser(GitlabObject):
736736
class ApplicationSettings(GitlabObject):
737737
_url = '/application/settings'
738738
_id_in_update_url = False
739+
getRequiresId = False
739740
optionalUpdateAttrs = ['after_sign_out_path',
740741
'container_registry_token_expire_delay',
741742
'default_branch_protection',
@@ -794,6 +795,7 @@ class KeyManager(BaseManager):
794795
class NotificationSettings(GitlabObject):
795796
_url = '/notification_settings'
796797
_id_in_update_url = False
798+
getRequiresId = False
797799
optionalUpdateAttrs = ['level',
798800
'notification_email',
799801
'new_note',
@@ -2022,6 +2024,7 @@ class ProjectService(GitlabObject):
20222024
canCreate = False
20232025
_id_in_update_url = False
20242026
_id_in_delete_url = False
2027+
getRequiresId = False
20252028
requiredUrlAttrs = ['project_id', 'service_name']
20262029

20272030
_service_attrs = {

tools/python_test.py

+8
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,14 @@
290290
settings = gl.notificationsettings.get()
291291
assert(settings.level == gitlab.NOTIFICATION_LEVEL_WATCH)
292292

293+
# services
294+
service = admin_project.services.get(service_name='asana')
295+
service.active = True
296+
service.api_key = 'whatever'
297+
service.save()
298+
service = admin_project.services.get(service_name='asana')
299+
assert(service.active == True)
300+
293301
# snippets
294302
snippets = gl.snippets.list()
295303
assert(len(snippets) == 0)

0 commit comments

Comments
 (0)