Skip to content

Commit

Permalink
Add query object later to database session.
Browse files Browse the repository at this point in the history
This line was added via #339.

Refs #775.
  • Loading branch information
jezdez committed Jan 28, 2019
1 parent 6f4bfdb commit a0fcf20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redash/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,9 +806,9 @@ def store_result(cls, org, data_source, query_hash, query, data, run_time, retri
for q in queries:
q.latest_query_data = query_result
q.skip_updated_at = True
db.session.add(q)
if q.schedule_resultset_size > 0:
q.query_results.append(query_result)
db.session.add(q)
query_ids = [q.id for q in queries]
logging.info("Updated %s queries with result (%s).", len(query_ids), query_hash)

Expand Down

0 comments on commit a0fcf20

Please sign in to comment.