summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store.go
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-07-28 18:01:10 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-07-28 18:01:10 +0500
commit5d77ff4bcde3496554551701438c1f42550e58b3 (patch)
treeb5ae06798661167b07286d381199c5de2004f300 /store/sql_channel_store.go
parent3dd541d3e09b99c60b892c37419dfa30b10700c7 (diff)
parent3a297135372c288b11c75acf6100d97c35c9dae3 (diff)
downloadchat-5d77ff4bcde3496554551701438c1f42550e58b3.tar.gz
chat-5d77ff4bcde3496554551701438c1f42550e58b3.tar.bz2
chat-5d77ff4bcde3496554551701438c1f42550e58b3.zip
Merge branch 'master' of https://github.com/mattermost/platform
Diffstat (limited to 'store/sql_channel_store.go')
-rw-r--r--store/sql_channel_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index 8961d5d97..f64558a92 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -120,7 +120,7 @@ func (s SqlChannelStore) Update(channel *model.Channel) StoreChannel {
if count, err := s.GetMaster().Update(channel); err != nil {
if IsUniqueConstraintError(err.Error(), "Name", "channels_name_teamid_key") {
dupChannel := model.Channel{}
- s.GetReplica().SelectOne(&dupChannel, "SELECT * FROM Channels WHERE TeamId=? AND Name=? AND DeleteAt > 0", channel.TeamId, channel.Name)
+ s.GetReplica().SelectOne(&dupChannel, "SELECT * FROM Channels WHERE TeamId = :TeamId AND Name= :Name AND DeleteAt > 0", map[string]interface{}{"TeamId": channel.TeamId, "Name": channel.Name})
if dupChannel.DeleteAt > 0 {
result.Err = model.NewAppError("SqlChannelStore.Update", "A channel with that name was previously created", "id="+channel.Id+", "+err.Error())
} else {