aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-04-18 20:37:47 +0200
committerGitHub <noreply@github.com>2021-04-18 20:37:47 +0200
commit24155156223595e48f215e87cf9ce7895e22f4a7 (patch)
tree84bb7a57e62f376068241bf911fa43b3694a1eb1 /bug/comment.go
parent718aa5f6e382b9c09caf866215358238ce6b5004 (diff)
parent6a5ffd94e0c7a2b9373981f99c4798eda601f4da (diff)
downloadgit-bug-24155156223595e48f215e87cf9ce7895e22f4a7.tar.gz
Merge pull request #631 from MichaelMure/comment-edit
Fix ID string in order to find correct bug instance on comment edit operation
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 4c9d118e..c1cfc7e5 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -11,6 +11,8 @@ import (
// Comment represent a comment in a Bug
type Comment struct {
+ // id should be the result of entity.CombineIds with the Bug id and the id
+ // of the Operation that created the comment
id entity.Id
Author identity.Interface
Message string
@@ -24,9 +26,8 @@ type Comment struct {
// Id return the Comment identifier
func (c Comment) Id() entity.Id {
if c.id == "" {
- // simply panic as it would be a coding error
- // (using an id of an identity not stored yet)
- panic("no id yet")
+ // simply panic as it would be a coding error (no id provided at construction)
+ panic("no id")
}
return c.id
}