Commit 9a1663997b532992ba3d5cd35bd5b4615cc05946
1 parent
d9198a01
Exists in
master
and in
31 other branches
Refactor url method of mr/issue
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
colab/plugins/gitlab/models.py
@@ -134,11 +134,12 @@ class GitlabComment(Collaboration): | @@ -134,11 +134,12 @@ class GitlabComment(Collaboration): | ||
134 | @property | 134 | @property |
135 | def url(self): | 135 | def url(self): |
136 | if self.issue_comment: | 136 | if self.issue_comment: |
137 | - return u'/gitlab/{}/issues/{}#notes_{}'.format( | ||
138 | - self.project.path_with_namespace, self.parent_id, self.iid) | 137 | + url_str = u'/gitlab/{}/issues/{}#notes_{}' |
139 | else: | 138 | else: |
140 | - return u'/gitlab/{}/merge_requests/{}#notes_{}'.format( | ||
141 | - self.project.path_with_namespace, self.parent_id, self.iid) | 139 | + url_str = u'/gitlab/{}/merge_requests/{}#notes_{}' |
140 | + | ||
141 | + return url_str.format(self.project.path_with_namespace, | ||
142 | + self.parent_id, self.iid) | ||
142 | 143 | ||
143 | class Meta: | 144 | class Meta: |
144 | verbose_name = _('Gitlab Comments') | 145 | verbose_name = _('Gitlab Comments') |