From ac4fe1e43edaa262a8ff56bd37320689593d013c Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Fri, 3 Jul 2015 11:31:29 +0200 Subject: [PATCH] Fix adding a link to somehing that is not an event --- indico/modules/attachments/controllers/management/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indico/modules/attachments/controllers/management/base.py b/indico/modules/attachments/controllers/management/base.py index 29a1fb416..4a966c1f5 100644 --- a/indico/modules/attachments/controllers/management/base.py +++ b/indico/modules/attachments/controllers/management/base.py @@ -74,7 +74,7 @@ class AddAttachmentLinkMixin: def _process(self): form = AttachmentLinkForm(linked_object=self.object) if form.validate_on_submit(): - folder = form.folder.data or AttachmentFolder.get_or_create_default(linked_object=self._conf) + folder = form.folder.data or AttachmentFolder.get_or_create_default(linked_object=self.object) link = Attachment(user=session.user, type=AttachmentType.link) form.populate_obj(link, skip={'acl'}) link.folder = folder -- 2.11.4.GIT