mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 14:40:00 +00:00
Hotfix Gravatar
This commit is contained in:
parent
ab6193d01d
commit
42725d4a3c
|
@ -507,7 +507,8 @@ class User(db.Model):
|
||||||
# Default image (https://en.gravatar.com/site/implement/images/#default-image)
|
# Default image (https://en.gravatar.com/site/implement/images/#default-image)
|
||||||
'd': flask.url_for('static', filename='img/avatar/default.png', _external=True),
|
'd': flask.url_for('static', filename='img/avatar/default.png', _external=True),
|
||||||
# Image rating (https://en.gravatar.com/site/implement/images/#rating)
|
# Image rating (https://en.gravatar.com/site/implement/images/#rating)
|
||||||
'r': 'pg' if app.SITE_FLAVOR['nyaa'] else 'x', # Nyaa: PG-rated, Sukebei: X-rated
|
'r': ('pg' if app.config['SITE_FLAVOR'] == 'nyaa' else
|
||||||
|
'x'), # Nyaa: PG-rated, Sukebei: X-rated
|
||||||
}
|
}
|
||||||
# construct the url
|
# construct the url
|
||||||
return 'https://www.gravatar.com/avatar/{}?{}'.format(
|
return 'https://www.gravatar.com/avatar/{}?{}'.format(
|
||||||
|
|
Loading…
Reference in a new issue