Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit522ecff

Browse files
nejchJohnVillalovos
authored andcommitted
docs(projects): document 404 gotcha with unactivated integrations
1 parent194b6be commit522ecff

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

‎docs/gl_objects/projects.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,23 @@ Reference
628628
Examples
629629
---------
630630

631-
Get a service::
631+
..danger::
632+
633+
Since GitLab 13.12, ``get()`` calls to project services return a
634+
``404 Not Found`` response until they have been activated the first time.
635+
636+
To avoid this, we recommend using `lazy=True` to prevent making
637+
the initial call when activating new services unless they have
638+
previously already been activated.
639+
640+
Configure and enable a service for the first time::
641+
642+
service = project.services.get('asana', lazy=True)
643+
644+
service.api_key = 'randomkey'
645+
service.save()
646+
647+
Get an existing service::
632648

633649
service = project.services.get('asana')
634650
# display its status (enabled/disabled)
@@ -642,11 +658,6 @@ List the code names of available services (doesn't return objects)::
642658

643659
services = project.services.available()
644660

645-
Configure and enable a service::
646-
647-
service.api_key = 'randomkey'
648-
service.save()
649-
650661
Disable a service::
651662

652663
service.delete()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp