diff options
author | =Corey Hulen <corey@hulen.com> | 2015-08-20 14:40:25 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-08-20 14:40:25 -0700 |
commit | 1b4135ab0da3c1635fae23f8f64247eb78866819 (patch) | |
tree | 9dc60b93717db033724f270a33ab1d76b0bf4e9b | |
parent | 3f0ec24dc1c18a550913beba8e742e0dbb4c7b42 (diff) | |
download | chat-1b4135ab0da3c1635fae23f8f64247eb78866819.tar.gz chat-1b4135ab0da3c1635fae23f8f64247eb78866819.tar.bz2 chat-1b4135ab0da3c1635fae23f8f64247eb78866819.zip |
Fixing bug
-rw-r--r-- | store/sql_channel_store.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go index cf34f2847..25cd46088 100644 --- a/store/sql_channel_store.go +++ b/store/sql_channel_store.go @@ -153,8 +153,10 @@ func (s SqlChannelStore) extraUpdated(channel *model.Channel) StoreChannel { channel.ExtraUpdated() - if count, err := s.GetMaster().Update(channel); err != nil || count != 1 { + if count, err := s.GetMaster().Update(channel); err != nil { result.Err = model.NewAppError("SqlChannelStore.extraUpdated", "Problem updating members last updated time", "id="+channel.Id+", "+err.Error()) + } else if count == 0 { + result.Err = model.NewAppError("SqlChannelStore.extraUpdated", "Problem updating members last updated time", "id="+channel.Id) } storeChannel <- result |