Commit 25e8a477 by Christian Duvholt

Fix many issues with attachments caused by attachment-filter not being specifc enough

parent 16a68946
...@@ -34,7 +34,8 @@ class AttachmentPreprocessor(markdown.preprocessors.Preprocessor): ...@@ -34,7 +34,8 @@ class AttachmentPreprocessor(markdown.preprocessors.Preprocessor):
try: try:
attachment = models.Attachment.objects.get( attachment = models.Attachment.objects.get(
articles__current_revision__deleted=False, articles__current_revision__deleted=False,
id=attachment_id, current_revision__deleted=False id=attachment_id, current_revision__deleted=False,
articles=self.markdown.article
) )
url = reverse('wiki:attachments_download', kwargs={'article_id': self.markdown.article.id, url = reverse('wiki:attachments_download', kwargs={'article_id': self.markdown.article.id,
'attachment_id':attachment.id,}) 'attachment_id':attachment.id,})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment