diff --git a/api4/license.go b/api4/license.go index 56c4f50d38..9fab5cc38c 100644 --- a/api4/license.go +++ b/api4/license.go @@ -309,7 +309,7 @@ func requestTrueUpReview(c *Context, w http.ResponseWriter, r *http.Request) { license := c.App.Channels().License() if license == nil { - c.Err = model.NewAppError("requestTrueUpReview", "api.license.true_up_review.license.required", nil, "", http.StatusNotImplemented) + c.Err = model.NewAppError("requestTrueUpReview", "api.license.true_up_review.license_required", nil, "", http.StatusNotImplemented) return } diff --git a/app/true_up.go b/app/true_up.go index 7240fc4e90..b80ed77333 100644 --- a/app/true_up.go +++ b/app/true_up.go @@ -20,6 +20,10 @@ import ( func (a *App) getTrueUpProfile() (*model.TrueUpReviewProfile, error) { license := a.Channels().License() + if license == nil { + return nil, model.NewAppError("requestTrueUpReview", "api.license.true_up_review.license_required", nil, "Could not get the total active users count", http.StatusInternalServerError) + } + // Customer Info & Usage Analytics activeUserCount, err := a.Srv().Store().Status().GetTotalActiveUsersCount() if err != nil { diff --git a/i18n/en.json b/i18n/en.json index 93716f8a4b..bf696f48a5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2085,10 +2085,6 @@ "id": "api.license.true_up_review.get_status_error", "translation": "Could not get true up status records" }, - { - "id": "api.license.true_up_review.license.required", - "translation": "A license is required to request a true up review." - }, { "id": "api.license.true_up_review.license_required", "translation": "True up review requires a license"