Skip to content

Commit 69f1045

Browse files
author
Gauvain Pocentek
committed
Properly handle the labels attribute in ProjectMergeRequest
This should have made it into e09581f but something went wrong (probably a PEBCAK). Closes #325
1 parent 9484106 commit 69f1045

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gitlab/v4/objects.py

+6
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,12 @@ class ProjectMergeRequestManager(CRUDMixin, RESTManager):
12131213
'milestone_id'))
12141214
_list_filters = ('iids', 'state', 'order_by', 'sort')
12151215

1216+
def _sanitize_data(self, data, action):
1217+
new_data = data.copy()
1218+
if 'labels' in data:
1219+
new_data['labels'] = ','.join(data['labels'])
1220+
return new_data
1221+
12161222

12171223
class ProjectMilestone(SaveMixin, ObjectDeleteMixin, RESTObject):
12181224
_short_print_attr = 'title'

0 commit comments

Comments
 (0)