MM-21229 - Customization > Site Name help text doesn't match text field behavior (#13540)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
mattermod
родитель
d4935fb22f
Коммит
49308e9163
@@ -4930,10 +4930,6 @@
|
||||
"id": "model.config.is_valid.site_url_email_batching.app_error",
|
||||
"translation": "Unable to enable email batching when SiteURL isn't set."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.sitename_empty.app_error",
|
||||
"translation": "Site name cannot be empty."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.sitename_length.app_error",
|
||||
"translation": "Site name must be less than or equal to {{.MaxLength}} characters."
|
||||
|
||||
@@ -2676,10 +2676,6 @@ func (s *TeamSettings) isValid() *AppError {
|
||||
return NewAppError("Config.IsValid", "model.config.is_valid.teammate_name_display.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if len(*s.SiteName) == 0 {
|
||||
return NewAppError("Config.IsValid", "model.config.is_valid.sitename_empty.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if len(*s.SiteName) > SITENAME_MAX_LENGTH {
|
||||
return NewAppError("Config.IsValid", "model.config.is_valid.sitename_length.app_error", map[string]interface{}{"MaxLength": SITENAME_MAX_LENGTH}, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
@@ -251,9 +251,8 @@ func TestTeamSettingsIsValidSiteNameEmpty(t *testing.T) {
|
||||
c1.SetDefaults()
|
||||
c1.TeamSettings.SiteName = NewString("")
|
||||
|
||||
// should fail fast because ts.SiteName is not set
|
||||
err := c1.TeamSettings.isValid()
|
||||
require.NotNil(t, err)
|
||||
// should not fail if ts.SiteName is not set, defaults are used
|
||||
require.Nil(t, c1.TeamSettings.isValid())
|
||||
}
|
||||
|
||||
func TestMessageExportSettingsIsValidEnableExportNotSet(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user