Fix crash in privacy page

This commit is contained in:
Jason McBrayer 2018-09-07 18:45:36 -04:00
parent 07932b775b
commit b456681de4
2 changed files with 8 additions and 1 deletions

View File

@ -21,6 +21,10 @@
<p> <p>
If you use the normal login form, your email will not be stored, only your instance name and access token. If you use the normal login form, your email will not be stored, only your instance name and access token.
</p> </p>
<p>
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.
</p>
<p> <p>
You can always revoke an access token through the web interface of your instance. You can always revoke an access token through the web interface of your instance.
</p> </p>
@ -37,7 +41,6 @@
<ul> <ul>
<li> A reference to your information in the database.</li> <li> A reference to your information in the database.</li>
<li> All of your <em>public</em> Mastodon profile information. This is needed for some client functionality.</li> <li> All of your <em>public</em> Mastodon profile information. This is needed for some client functionality.</li>
<li> A couple of Mastodon settings: your default post privacy, and whether your media default to sensitive.</li>
</ul> </ul>
</section> </section>
{% endblock %} {% endblock %}

View File

@ -765,6 +765,10 @@ def about(request):
}) })
def privacy(request): def privacy(request):
account, mastodon = get_usercontext(request) account, mastodon = get_usercontext(request)
if account:
preferences = account.preferences
else:
preferences = None
return render(request, 'privacy.html', return render(request, 'privacy.html',
{"preferences": preferences, {"preferences": preferences,
'own_acct' : request.session.get('user', None)}) 'own_acct' : request.session.get('user', None)})