From b456681de4fec74ecce087c9b5a143d64c2beb2c Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Fri, 7 Sep 2018 18:45:36 -0400 Subject: [PATCH] Fix crash in privacy page --- brutaldon/templates/privacy.html | 5 ++++- brutaldon/views.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/brutaldon/templates/privacy.html b/brutaldon/templates/privacy.html index d21b13e..67eb859 100644 --- a/brutaldon/templates/privacy.html +++ b/brutaldon/templates/privacy.html @@ -21,6 +21,10 @@

If you use the normal login form, your email will not be stored, only your instance name and access token.

+

+ Both methods of login will store your username and instance name. All of your brutaldon settings (theme, timezone, etc) are stored and associated with your username. +

+

You can always revoke an access token through the web interface of your instance.

@@ -37,7 +41,6 @@ {% endblock %} diff --git a/brutaldon/views.py b/brutaldon/views.py index 17c0651..0c9373b 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -765,6 +765,10 @@ def about(request): }) def privacy(request): account, mastodon = get_usercontext(request) + if account: + preferences = account.preferences + else: + preferences = None return render(request, 'privacy.html', {"preferences": preferences, 'own_acct' : request.session.get('user', None)})