apply black

This commit is contained in:
Frédéric Péters 2021-06-01 10:29:59 +02:00
parent 67c311830a
commit 7b106db303
2 changed files with 12 additions and 3 deletions

View File

@ -72,8 +72,7 @@ WSGI_APPLICATION = 'pfwb_archives_proxy.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
}
DATABASES = {}
# Password validation

View File

@ -30,7 +30,17 @@ def redirect(request, sess, no, nodoc=None, anx=None):
else:
query += ' AND type NOT IN %(distinct_types)s'
cur.execute(query, {'sess': sess, 'no': no, 'nodoc': nodoc, 'anx': anx, 'type': type_, 'distinct_types': distinct_types})
cur.execute(
query,
{
'sess': sess,
'no': no,
'nodoc': nodoc,
'anx': anx,
'type': type_,
'distinct_types': distinct_types,
},
)
rows = cur.fetchall()
if rows:
url = 'https://archives.pfwb.be/%s' % rows[0][0]