Skip to content

Commit

Permalink
Fix comment xorm
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCocoon committed Nov 7, 2024
1 parent 59732a9 commit 0d80405
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/conversations/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ type ConversationComment struct {
Content string `xorm:"LONGTEXT"`
ContentVersion int `xorm:"NOT NULL DEFAULT 0"`

ConversationID int64 `xorm:"INDEX"`
Conversation *Conversation
ConversationID int64 `xorm:"INDEX"`
Conversation *Conversation `xorm:"-"`

CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
Expand Down
3 changes: 3 additions & 0 deletions models/conversations/conversation.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ var ErrConversationAlreadyChanged = util.NewInvalidArgumentErrorf("the conversat

type ConversationType int

// CommentTypeUndefined is used to search for comments of any type
const ConversationTypeUndefined CommentType = -1

const (
ConversationTypeCommit ConversationType = iota
)
Expand Down

0 comments on commit 0d80405

Please sign in to comment.