Fix bad indentation
authorMagnus Hagander <magnus@hagander.net>
Sat, 29 Dec 2018 13:40:50 +0000 (14:40 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 29 Dec 2018 13:50:33 +0000 (14:50 +0100)
django/archives/mailarchives/views.py
django/archives/urls.py

index 1e1630a2570bf18f7a2909daa03f08c36cdaf8e8..4d5304b281faaa299d1dc77c1e0fda2fa5003cff 100644 (file)
@@ -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)
index fd26056d41addbd96bd942889706921da50db2e4..a582acc0175e500029621475fabac4aee13f40fd 100644 (file)
@@ -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),
+    ]