1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-17 18:26:17 +02:00

Adds the parent ID filter when fetching child blocks to extract fileId and attachmentId (#4802) (#4807)

(cherry picked from commit e0dbb380a3)

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
This commit is contained in:
Mattermost Build 2023-07-21 19:09:30 +03:00 committed by GitHub
parent 0bc903cdc2
commit b83e2f421f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -956,6 +956,10 @@ func (s *SQLStore) deleteBlockChildren(db sq.BaseRunner, boardID string, parentI
From(s.tablePrefix + "blocks").
Where(sq.Eq{"board_id": boardID})
if parentID != "" {
fileDeleteQuery = fileDeleteQuery.Where(sq.Eq{"parent_id": parentID})
}
rows, err := fileDeleteQuery.Query()
if err != nil {
return err