From 49b3009205d97cda17e6ec7c67a13a6c576ef72c Mon Sep 17 00:00:00 2001 From: Gust Date: Mon, 27 Jul 2015 17:49:31 -0300 Subject: [PATCH] Fix issue iid --- colab/plugins/gitlab/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/colab/plugins/gitlab/models.py b/colab/plugins/gitlab/models.py index cbc9b2e..0f6a612 100644 --- a/colab/plugins/gitlab/models.py +++ b/colab/plugins/gitlab/models.py @@ -64,6 +64,7 @@ class GitlabMergeRequest(Collaboration): class GitlabIssue(Collaboration): id = models.IntegerField(primary_key=True) + iid = models.IntegerField(null=True) project = models.ForeignKey(GitlabProject, null=True, on_delete=models.SET_NULL) title = models.TextField() @@ -82,7 +83,7 @@ class GitlabIssue(Collaboration): @property def url(self): return u'/gitlab/{}/issues/{}'.format( - self.project.path_with_namespace, self.id) + self.project.path_with_namespace, self.iid) class Meta: verbose_name = _('Gitlab Issue') @@ -92,7 +93,6 @@ class GitlabIssue(Collaboration): class GitlabComment(Collaboration): id = models.IntegerField(primary_key=True) - iid = models.IntegerField(null=True) body = models.TextField() created_at = models.DateTimeField(blank=True, null=True) issue_comment = models.BooleanField(default=True) @@ -139,7 +139,7 @@ class GitlabComment(Collaboration): url_str = u'/gitlab/{}/merge_requests/{}#notes_{}' return url_str.format(self.project.path_with_namespace, - self.parent_id, self.iid) + self.parent_id, self.id) class Meta: verbose_name = _('Gitlab Comments') -- libgit2 0.21.2