summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/system_store.go
diff options
context:
space:
mode:
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)
}