Skip to content

crash while trying to save default branch for a given project #346

Closed
@arnaudgelas

Description

@arnaudgelas

As mentioned in #330, while iterating on group's project, I have tried saving but it crashes:

g = gl.groups.get(group_id)
projects = g.projects.list(all=True)
for p in projects:
    p.default=branch = 'develop'
    p.save()

I get the following error:

Traceback (most recent call last):
  File "./default_branch.py", line 76, in <module>
    p.save()
  File "/usr/local/lib/python2.7/dist-packages/gitlab/mixins.py", line 275, in save
    updated_data = self._get_updated_data()
  File "/usr/local/lib/python2.7/dist-packages/gitlab/mixins.py", line 254, in _get_updated_data
    required, optional = self.manager.get_update_attrs()
AttributeError: 'GroupProjectManager' object has no attribute 'get_update_attrs'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions