def export_data(self, user, query=None, filename=None):
        task_type = ExportCSVTask

        if query:
            description = _('Export search results for "%(query)s" in %(slug)s.') \
                % {'query': query, 'slug': self.slug}
        else:
            description = _('Exporting data in %s.') % self.slug

        self.current_task = TaskStatus.objects.create(
            task_name=task_type.name,
            task_description=description,
            creator=user
        )

        self.save()

        task_type.apply_async(
            args=[self.slug],
            kwargs={ 'query': query, 'filename': filename },
            task_id=self.current_task.id
        )
Mark the current version of the review branch as 'bad abandoned'.
dataset/ETHPy150Open pandaproject/panda/panda/models/dataset.py/Dataset.export_data--crossover with--dataset/ETHPy150Open bloomberg/phabricator-tools/py/abd/abdt_branch.py/Branch.mark_bad_abandoned