From b0e367b19249e72748e719b7ff69671db3656e25 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Tue, 22 Aug 2017 10:20:54 -0700 Subject: Fixing race in update channel (#7269) * Fixing race in update channel * Switching to struct copy --- model/channel.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'model/channel.go') diff --git a/model/channel.go b/model/channel.go index 50d487557..48abd1070 100644 --- a/model/channel.go +++ b/model/channel.go @@ -53,6 +53,11 @@ type ChannelPatch struct { Purpose *string `json:"purpose"` } +func (o *Channel) DeepCopy() *Channel { + copy := *o + return © +} + func (o *Channel) ToJson() string { b, err := json.Marshal(o) if err != nil { -- cgit v1.2.3-1-g7c22