mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-08 15:06:08 +02:00
Adds the parent ID filter when fetching child blocks to extract fileId and attachmentId (#4802) (#4809)
(cherry picked from commit e0dbb380a3
)
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
This commit is contained in:
parent
89a24960cc
commit
93a57ecfe0
@ -968,6 +968,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
|
||||
|
Loading…
Reference in New Issue
Block a user