Don't add templates to default category (#4174)
* don't add templates to default category * check for IsTemplate rather than teamID = 0, as Personal Server is always teamid = 0
This commit is contained in:
parent
bcbc9b8b72
commit
1454095bdd
1 changed files with 5 additions and 3 deletions
|
@ -300,7 +300,7 @@ func (a *App) CreateBoard(board *model.Board, userID string, addMember bool) (*m
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if board.TeamID != "0" {
|
if !board.IsTemplate {
|
||||||
if err := a.addBoardsToDefaultCategory(userID, newBoard.TeamID, []*model.Board{newBoard}); err != nil {
|
if err := a.addBoardsToDefaultCategory(userID, newBoard.TeamID, []*model.Board{newBoard}); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -519,8 +519,10 @@ func (a *App) AddMemberToBoard(member *model.BoardMember) (*model.BoardMember, e
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = a.addBoardsToDefaultCategory(member.UserID, board.TeamID, []*model.Board{board}); err != nil {
|
if !board.IsTemplate {
|
||||||
return nil, err
|
if err = a.addBoardsToDefaultCategory(member.UserID, board.TeamID, []*model.Board{board}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a.blockChangeNotifier.Enqueue(func() error {
|
a.blockChangeNotifier.Enqueue(func() error {
|
||||||
|
|
Loading…
Reference in a new issue