Switch to side-by-side view
--- a/Allura/allura/model/discuss.py +++ b/Allura/allura/model/discuss.py @@ -527,6 +527,12 @@ return self.attachment_class().query.find(dict( post_id=self._id, type='attachment')) + def add_multiple_attach(self, file_info): + if isinstance(file_info, list): + map(self.add_attachment, file_info) + else: + self.add_attachment(file_info) + def add_attachment(self, file_info): if hasattr(file_info, 'file'): mime_type = file_info.type