Added precense check for scheduled posts before accessing error code (#29322)

* Added precense check for scheduled posts before accesing error code

* Expliocitelly stated the undefined nature
Этот коммит содержится в:
Harshil Sharma
2024-11-19 16:28:09 +05:30
коммит произвёл GitHub
родитель e5a4b1efba
Коммит 949e13725f
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@@ -915,7 +915,7 @@ func patchPost(c *Context, w http.ResponseWriter, r *http.Request) {
}
// Updating the file_ids of a post is not a supported operation and will be ignored
post.FileIds = nil
//post.FileIds = nil
originalPost, err := c.App.GetSinglePost(c.AppContext, c.Params.PostId, false)
if err != nil {