From 98c6b19fae0c8d59d8752e5ee6cefd76e2d56c97 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 29 Dec 2018 14:40:50 +0100 Subject: [PATCH] Fix bad indentation --- django/archives/mailarchives/views.py | 16 ++++++++-------- django/archives/urls.py | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py index 1e1630a..4d5304b 100644 --- a/django/archives/mailarchives/views.py +++ b/django/archives/mailarchives/views.py @@ -353,7 +353,7 @@ def attachment(request, attid): # XXX: minor information leak, because we load the whole attachment before we check # the thread permissions. Is that OK? curs = connection.cursor() - curs.execute("SELECT filename, contenttype, messageid, attachment FROM attachments INNER JOIN messages ON messages.id=attachments.message AND attachments.id=%(id)s AND messages.hiddenstatus IS NULL", {'id': int(attid)}) + curs.execute("SELECT filename, contenttype, messageid, attachment FROM attachments INNER JOIN messages ON messages.id=attachments.message AND attachments.id=%(id)s AND messages.hiddenstatus IS NULL", {'id': int(attid)}) r = curs.fetchall() if len(r) != 1: return HttpResponse("Attachment not found") @@ -384,16 +384,16 @@ def _get_nextprevious(listmap, dt): ) SELECT l.listid,1, (SELECT ARRAY[messageid,to_char(date, 'yyyy-mm-dd hh24:mi:ss'),subject,_from] FROM messages m - INNER JOIN list_threads lt ON lt.threadid=m.threadid - WHERE m.date>%(time)s AND lt.listid=l.listid - ORDER BY m.date LIMIT 1 + INNER JOIN list_threads lt ON lt.threadid=m.threadid + WHERE m.date>%(time)s AND lt.listid=l.listid + ORDER BY m.date LIMIT 1 ) FROM l UNION ALL SELECT l.listid,0, (SELECT ARRAY[messageid,to_char(date, 'yyyy-mm-dd hh24:mi:ss'),subject,_from] FROM messages m - INNER JOIN list_threads lt ON lt.threadid=m.threadid - WHERE m.date<%(time)s AND lt.listid=l.listid - ORDER BY m.date DESC LIMIT 1 + INNER JOIN list_threads lt ON lt.threadid=m.threadid + WHERE m.date<%(time)s AND lt.listid=l.listid + ORDER BY m.date DESC LIMIT 1 ) FROM l""", { 'lists': listmap.keys(), 'time': dt, @@ -722,7 +722,7 @@ _dynamic_cssmap = { 'docs': ['media/css/global.css', 'media/css/table.css', 'media/css/text.css', - 'media/css/docs.css'], + 'media/css/docs.css'], } @cache(hours=8) diff --git a/django/archives/urls.py b/django/archives/urls.py index fd26056..a582acc 100644 --- a/django/archives/urls.py +++ b/django/archives/urls.py @@ -65,11 +65,11 @@ urlpatterns = [ ] if not settings.PUBLIC_ARCHIVES: - import archives.auth - - urlpatterns += [ - # For non-public archives, support login - url(r'^accounts/login/?$', archives.auth.login), - url(r'^accounts/logout/?$', archives.auth.logout), - url(r'^auth_receive/$', archives.auth.auth_receive), - ] + import archives.auth + + urlpatterns += [ + # For non-public archives, support login + url(r'^accounts/login/?$', archives.auth.login), + url(r'^accounts/logout/?$', archives.auth.logout), + url(r'^auth_receive/$', archives.auth.auth_receive), + ] -- 2.39.5