Browse Source

Don't blurp on drafter attachments.

Rafał Pitoń 11 years ago
parent
commit
1c60542019
1 changed files with 2 additions and 1 deletions
  1. 2 1
      misago/apps/attachments.py

+ 2 - 1
misago/apps/attachments.py

@@ -11,7 +11,8 @@ from misago.shortcuts import render_to_response
 def server(request, attachment, thumb=False):
     try:
         attachment = Attachment.objects.select_related('forum', 'thread', 'post', 'user').get(hash_id=attachment)
-        request.acl.forums.allow_forum_view(attachment.forum)
+        if attachment.forum:
+            request.acl.forums.allow_forum_view(attachment.forum)
         if attachment.thread:
             request.acl.threads.allow_thread_view(request.user, attachment.thread)
             if attachment.forum.special == 'private_threads':