MM-24544: Fix crash in (*Status).ToClusterJson (#14484)

We apply the same fix that was done in https://github.com/mattermost/mattermost-server/pull/14147.
This method was missed out.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Agniva De Sarker
2020-08-13 17:30:38 +05:30
committed by GitHub
parent 4e43826c5c
commit 220d39d09b

View File

@@ -35,7 +35,8 @@ func (o *Status) ToJson() string {
}
func (o *Status) ToClusterJson() string {
b, _ := json.Marshal(o)
oCopy := *o
b, _ := json.Marshal(oCopy)
return string(b)
}