InsertBlock per workspace logic (#777)

This commit is contained in:
Chen-I Lim 2021-07-24 08:08:25 -07:00 committed by GitHub
parent 7a85202830
commit 3b11202e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -392,7 +392,7 @@ func (s *SQLStore) InsertBlock(c store.Container, block *model.Block, userID str
// block with ID exists, so this is an update operation
query := s.getQueryBuilder().Update(s.tablePrefix+"blocks").
Where(sq.Eq{"id": block.ID}).
Set("workspace_id", c.WorkspaceID).
Where(sq.Eq{"COALESCE(workspace_id, '0')": c.WorkspaceID}).
Set("parent_id", block.ParentID).
Set("root_id", block.RootID).
Set("modified_by", block.ModifiedBy).