Skip to content

Commit

Permalink
Fix: saving new query.
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Feb 27, 2014
1 parent 766840d commit 51a37ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rd_ui/app/scripts/controllers.js
Expand Up @@ -239,7 +239,7 @@
$scope.queryResult = $scope.query.getQueryResult();
});
} else {
$scope.query = new Query({query: "", name: "New Query", ttl: -1, user: currentUser.name});
$scope.query = new Query({query: "", name: "New Query", ttl: -1, user: currentUser});
$scope.lockButton(false);
}

Expand Down
2 changes: 1 addition & 1 deletion redash/controllers.py
Expand Up @@ -207,7 +207,7 @@ def get(self):
class QueryAPI(BaseResource):
def post(self, query_id):
query_def = request.get_json(force=True)
for field in ['id', 'created_at', 'api_key', 'visualizations', 'latest_query_data']:
for field in ['id', 'created_at', 'api_key', 'visualizations', 'latest_query_data', 'user']:
query_def.pop(field, None)

if 'latest_query_data_id' in query_def:
Expand Down

0 comments on commit 51a37ca

Please sign in to comment.