Skip to content

Commit 0d80405

Browse files
committed
Fix comment xorm
1 parent 59732a9 commit 0d80405

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

models/conversations/comment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ type ConversationComment struct {
124124
Content string `xorm:"LONGTEXT"`
125125
ContentVersion int `xorm:"NOT NULL DEFAULT 0"`
126126

127-
ConversationID int64 `xorm:"INDEX"`
128-
Conversation *Conversation
127+
ConversationID int64 `xorm:"INDEX"`
128+
Conversation *Conversation `xorm:"-"`
129129

130130
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
131131
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`

models/conversations/conversation.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ var ErrConversationAlreadyChanged = util.NewInvalidArgumentErrorf("the conversat
9494

9595
type ConversationType int
9696

97+
// CommentTypeUndefined is used to search for comments of any type
98+
const ConversationTypeUndefined CommentType = -1
99+
97100
const (
98101
ConversationTypeCommit ConversationType = iota
99102
)

0 commit comments

Comments
 (0)