diff --git a/gitlab/v4/objects/labels.py b/gitlab/v4/objects/labels.py index c9514c998..218f1f3c9 100644 --- a/gitlab/v4/objects/labels.py +++ b/gitlab/v4/objects/labels.py @@ -20,7 +20,8 @@ class GroupLabel(SubscribableMixin, SaveMixin, ObjectDeleteMixin, RESTObject): - _id_attr = "name" + _id_attr = "id" + _repr_attr = "name" manager: GroupLabelManager # Update without ID, but we need an ID to get from list. @@ -81,7 +82,8 @@ def update( # type: ignore[override] class ProjectLabel( PromoteMixin, SubscribableMixin, SaveMixin, ObjectDeleteMixin, RESTObject ): - _id_attr = "name" + _id_attr = "id" + _repr_attr = "name" manager: ProjectLabelManager # Update without ID, but we need an ID to get from list.