summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/system_store.go
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-06-01 15:11:22 +0200
committerGeorge Goldberg <george@gberg.me>2018-06-01 14:11:22 +0100
commit5992a729c50989b7a39e42a0aaed42bc3914fb13 (patch)
tree1843eb260f6e79447907a5aaf5fe7bbf3e54ec69 /store/sqlstore/system_store.go
parent516a097e1ad588d860b374ef1d0eff202adb286b (diff)
downloadchat-5992a729c50989b7a39e42a0aaed42bc3914fb13.tar.gz
chat-5992a729c50989b7a39e42a0aaed42bc3914fb13.tar.bz2
chat-5992a729c50989b7a39e42a0aaed42bc3914fb13.zip
MM-10760: Using master for any Exec call (#8895)
Diffstat (limited to 'store/sqlstore/system_store.go')
-rw-r--r--store/sqlstore/system_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sqlstore/system_store.go b/store/sqlstore/system_store.go
index 4065bb955..4d5afad3f 100644
--- a/store/sqlstore/system_store.go
+++ b/store/sqlstore/system_store.go
@@ -89,7 +89,7 @@ func (s SqlSystemStore) GetByName(name string) store.StoreChannel {
func (s SqlSystemStore) PermanentDeleteByName(name string) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
var system model.System
- if _, err := s.GetReplica().Exec("DELETE FROM Systems WHERE Name = :Name", map[string]interface{}{"Name": name}); err != nil {
+ if _, err := s.GetMaster().Exec("DELETE FROM Systems WHERE Name = :Name", map[string]interface{}{"Name": name}); err != nil {
result.Err = model.NewAppError("SqlSystemStore.PermanentDeleteByName", "store.sql_system.permanent_delete_by_name.app_error", nil, "", http.StatusInternalServerError)
}