From 30197584d5a215a3b25bffa79a034ed9e360cf52 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 16 Feb 2018 13:51:46 -0600 Subject: always return non-nil client license (#8317) --- app/license.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/license.go') diff --git a/app/license.go b/app/license.go index efb725a20..c12f23d1d 100644 --- a/app/license.go +++ b/app/license.go @@ -130,7 +130,7 @@ func (a *App) SetLicense(license *model.License) bool { } a.licenseValue.Store((*model.License)(nil)) - a.SetClientLicense(map[string]string{"IsLicensed": "false"}) + a.clientLicenseValue.Store(map[string]string(nil)) return false } @@ -149,8 +149,10 @@ func (a *App) SetClientLicense(m map[string]string) { } func (a *App) ClientLicense() map[string]string { - clientLicense, _ := a.clientLicenseValue.Load().(map[string]string) - return clientLicense + if clientLicense, _ := a.clientLicenseValue.Load().(map[string]string); clientLicense != nil { + return clientLicense + } + return map[string]string{"IsLicensed": "false"} } func (a *App) RemoveLicense() *model.AppError { -- cgit v1.2.3-1-g7c22