summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2018-09-06 22:41:19 +0100
committerCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-09-06 23:41:19 +0200
commit72258266aa4556557262bb517918ba2194bd7edb (patch)
tree5826150ed8f3c54dc50301e01dab6961cf68f5b9 /model
parentd2190527eafdae31e14ba0832dcfb79a0a1e223b (diff)
downloadchat-72258266aa4556557262bb517918ba2194bd7edb.tar.gz
chat-72258266aa4556557262bb517918ba2194bd7edb.tar.bz2
chat-72258266aa4556557262bb517918ba2194bd7edb.zip
MM-11649: Fix caching issue in channel API endpoints. (#9345)
This fixes an issue where the cached Channel objects would contain data from a failed update when the update to the database failed.
Diffstat (limited to 'model')
-rw-r--r--model/channel.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/model/channel.go b/model/channel.go
index 7a57496ae..09e5e389c 100644
--- a/model/channel.go
+++ b/model/channel.go
@@ -59,6 +59,9 @@ type ChannelPatch struct {
func (o *Channel) DeepCopy() *Channel {
copy := *o
+ if copy.SchemeId != nil {
+ copy.SchemeId = NewString(*o.SchemeId)
+ }
return &copy
}