]> source.dussan.org Git - gitea.git/commitdiff
Fix template error on account page (#8562)
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>
Sat, 19 Oct 2019 09:01:33 +0000 (04:01 -0500)
committerzeripath <art27@cantab.net>
Sat, 19 Oct 2019 09:01:33 +0000 (10:01 +0100)
routers/user/setting/account.go

index e7de2dffd40b477ae4380803f44d9e51bce5a329..73799c8bd72e96a5be818c707e3399e59fbf0682 100644 (file)
@@ -28,7 +28,6 @@ func Account(ctx *context.Context) {
        ctx.Data["Title"] = ctx.Tr("settings")
        ctx.Data["PageIsSettingsAccount"] = true
        ctx.Data["Email"] = ctx.User.Email
-       ctx.Data["EmailNotificationsPreference"] = ctx.User.EmailNotifications()
 
        loadAccountData(ctx)
 
@@ -230,4 +229,5 @@ func loadAccountData(ctx *context.Context) {
                return
        }
        ctx.Data["Emails"] = emails
+       ctx.Data["EmailNotificationsPreference"] = ctx.User.EmailNotifications()
 }