Commit 43a16ac1 authored by Nicolas Roeser's avatar Nicolas Roeser Committed by John Villalovos
Browse files

docs(faq): correct the attribute fetching example

There is an example about object attributes in the FAQ. It shows how to
properly fetch all attributes of all projects, by using list() followed
by a get(id) call.

Unfortunately this example used a wrong variable name, which caused it
not to work and which could have made it slightly confusing to readers.
This commit fixes that, by changing the variable name.

Now the example uses one variable for two Python objects. As they
correspond to the same GitLab object and the intended behavior is to
obtain that very object, just with all attributes, this is fine and is
probably what readers will find most useful in this context.
parent bdc155b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ To retrieve an object with all attributes, use a ``get()`` call.

Example with projects::

    for projects in gl.projects.list():
    for project in gl.projects.list():
        # Retrieve project object with all attributes
        project = gl.projects.get(project.id)