diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-23 20:50:39 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-07-23 19:50:39 +0100 |
commit | 54d96c79b5b9f3d5d47aed59729ae779968fbecb (patch) | |
tree | 3d74fa2aecf3a9c5a23a1ec0c7e66fca270216aa /routers/org | |
parent | 2f75766532fbf30883c05e93ef01c19268216c45 (diff) | |
download | gitea-54d96c79b5b9f3d5d47aed59729ae779968fbecb.tar.gz gitea-54d96c79b5b9f3d5d47aed59729ae779968fbecb.zip |
Removed unnecessary conversions (#7557)
No need to convert to the same type.
Diffstat (limited to 'routers/org')
-rw-r--r-- | routers/org/setting.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/org/setting.go b/routers/org/setting.go index b3ff01d238..1d534ec558 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -14,7 +14,6 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" userSetting "code.gitea.io/gitea/routers/user/setting" ) @@ -31,7 +30,7 @@ const ( func Settings(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("org.settings") ctx.Data["PageIsSettingsOptions"] = true - ctx.Data["CurrentVisibility"] = structs.VisibleType(ctx.Org.Organization.Visibility) + ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility ctx.HTML(200, tplSettingsOptions) } @@ -39,7 +38,7 @@ func Settings(ctx *context.Context) { func SettingsPost(ctx *context.Context, form auth.UpdateOrgSettingForm) { ctx.Data["Title"] = ctx.Tr("org.settings") ctx.Data["PageIsSettingsOptions"] = true - ctx.Data["CurrentVisibility"] = structs.VisibleType(ctx.Org.Organization.Visibility) + ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility if ctx.HasError() { ctx.HTML(200, tplSettingsOptions) |