You've already forked focalboard
mirror of
https://github.com/mattermost/focalboard.git
synced 2025-07-15 23:54:29 +02:00
fix crash in DeleteBlock (#2040)
* fix crash in deleteblock * fix unit test
This commit is contained in:
@ -1594,8 +1594,8 @@ func (a *API) handleCreateSubscription(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// check for valid block
|
||||
_, err = a.app.GetBlockWithID(*container, sub.BlockID)
|
||||
if err != nil {
|
||||
block, err := a.app.GetBlockWithID(*container, sub.BlockID)
|
||||
if err != nil || block == nil {
|
||||
a.errorResponse(w, r.URL.Path, http.StatusBadRequest, "invalid blockID", err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user