Yuvipanda has uploaded a new change for review.
https://gerrit.wikimedia.org/r/153799
Change subject: Fix NPE when creating a new query
......................................................................
Fix NPE when creating a new query
Change-Id: I7ceb52759d4b4482b7d6a62617d58ccf6bfa0acc
---
M quarry/web/app.py
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/quarry/web
refs/changes/99/153799/1
diff --git a/quarry/web/app.py b/quarry/web/app.py
index 010e92c..bd49b67 100644
--- a/quarry/web/app.py
+++ b/quarry/web/app.py
@@ -119,9 +119,8 @@
'can_edit': can_edit
}
- # Check if there's a run?
- query_run = query.latest_rev.latest_run
- if query_run is not None:
+ if query.latest_rev and query.latest_rev.latest_run:
+ query_run = query.latest_rev.latest_run
jsvars['output_url'] = url_for('api_query_output',
user_id=query.user_id, run_id=query_run.id)
return render_template(
--
To view, visit https://gerrit.wikimedia.org/r/153799
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ceb52759d4b4482b7d6a62617d58ccf6bfa0acc
Gerrit-PatchSet: 1
Gerrit-Project: analytics/quarry/web
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits