mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-15288: Migrate CommandStore.Get to sync by default (#10739)
* MM-15288: Migrate Command.Get to sync by default * addressing review comments, updating status code of err returned by Get Method
This commit is contained in:
committed by
Jesús Espino
parent
fc15eda37f
commit
2d3fb4f426
@@ -55,9 +55,7 @@ func getCommandFromCommandArg(a *app.App, commandArg string) *model.Command {
|
||||
}
|
||||
|
||||
if command == nil {
|
||||
if result := <-a.Srv.Store.Command().Get(commandPart); result.Err == nil {
|
||||
command = result.Data.(*model.Command)
|
||||
}
|
||||
command, _ = a.Srv.Store.Command().Get(commandPart)
|
||||
}
|
||||
|
||||
return command
|
||||
|
||||
Reference in New Issue
Block a user