Fix scheduled reports for mysql (#6512)

* Fix scheduled reports for mysql

* Really revert setup.py

* Fix after rebase
This commit is contained in:
Mahendra M 2019-01-12 20:29:03 -08:00 committed by Maxime Beauchemin
parent 8e6c114195
commit 42cf929f62
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ def deliver_slice(schedule):
@celery_app.task(name='email_reports.send', bind=True, soft_time_limit=300)
def schedule_email_report(task, report_type, schedule_id, recipients=None):
model_cls = get_scheduler_model(report_type)
schedule = db.session.query(model_cls).get(schedule_id)
schedule = db.create_scoped_session().query(model_cls).get(schedule_id)
# The user may have disabled the schedule. If so, ignore this
if not schedule or not schedule.active: