| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,6 +61,13 @@ Update a group:: | |||
| 61 | 61 | group.description = 'My awesome group' | |
| 62 | 62 | group.save() | |
| 63 | 63 | ||
| 64 | + Set the avatar image for a group:: | ||
| 65 | + | ||
| 66 | + # the avatar image can be passed as data (content of the file) or as a file | ||
| 67 | + # object opened in binary mode | ||
| 68 | + group.avatar = open('path/to/file.png', 'rb') | ||
| 69 | + group.save() | ||
| 70 | + | ||
| 64 | 71 | Remove a group:: | |
| 65 | 72 | ||
| 66 | 73 | gl.groups.delete(group_id) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1513,6 +1513,7 @@ class GroupManager(CRUDMixin, RESTManager): | |||
| 1513 | 1513 | "default_branch_protection", | |
| 1514 | 1514 | ), | |
| 1515 | 1515 | ) | |
| 1516 | + _types = {"avatar": types.ImageAttribute} | ||
| 1516 | 1517 | ||
| 1517 | 1518 | @exc.on_http_error(exc.GitlabImportError) | |
| 1518 | 1519 | def import_group(self, file, path, name, parent_id=None, **kwargs): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments