From 66a44009c8f52ccda1b01184d115ae361d4d8767 Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Fri, 24 Jul 2015 14:11:26 +0200 Subject: [PATCH] Add missing join --- indico/modules/attachments/controllers/event_package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indico/modules/attachments/controllers/event_package.py b/indico/modules/attachments/controllers/event_package.py index ada69466a..b5e614281 100644 --- a/indico/modules/attachments/controllers/event_package.py +++ b/indico/modules/attachments/controllers/event_package.py @@ -106,7 +106,7 @@ class AttachmentPackageGeneratorMixin: unicode(_get_start_date(att.folder.linked_object)) in dates] def _filter_by_date(self, query, added_since): - return query.filter(cast(AttachmentFile.created_dt, Date) >= added_since) + return query.join(Attachment.file).filter(cast(AttachmentFile.created_dt, Date) >= added_since) def _generate_zip_file(self, attachments): # XXX: could use a celery task to delay the temporary file after a day or so. -- 2.11.4.GIT