Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User can't save query without query text #669

Closed
arikfr opened this issue Nov 23, 2015 · 4 comments
Closed

User can't save query without query text #669

arikfr opened this issue Nov 23, 2015 · 4 comments

Comments

@arikfr
Copy link
Member

arikfr commented Nov 23, 2015

(seems like it doesn't pass the data_source_id)

@alonho
Copy link
Contributor

alonho commented Nov 30, 2015

Can't reproduce.. I created a query, saved, it worked. Also tried creating, renaming and saving.

@arikfr
Copy link
Member Author

arikfr commented Nov 30, 2015

STR:

  1. Open new query.
  2. Change query name.
  3. Hit enter. Soon after "Can't save query" message appears.

@alonho
Copy link
Contributor

alonho commented Nov 30, 2015

I tried pressing the save button and it worked through there.

This happens because update to the name/description is considered a partial update and sets only the name/description field. When that happens and a query was just created, there's no id, so the api call that is used is 'create query' and not 'update query'. 'create query' expects a data source id.

@arikfr
Copy link
Member Author

arikfr commented Nov 30, 2015

OK, it makes sense now. How about we don't try doing partial save until
query has an id?
On Nov 30, 2015 5:44 PM, "Alon Horev" notifications@github.com wrote:

I tried pressing the save button and it worked through there.

This happens because update to the name/description is considered a
partial update and sets only the name/description field. When that happens
and a query was just created, there's no id, so the api call that is used
is 'create query' and not 'update query'. 'create query' expects a data
source id.


Reply to this email directly or view it on GitHub
#669 (comment).

alonho added a commit to alonho/redash that referenced this issue Nov 30, 2015
@arikfr arikfr closed this as completed in 2c2ff0d Jun 14, 2016
arikfr added a commit that referenced this issue Jun 14, 2016
Fix #669: save fails when doing partial save of new query
simo7 pushed a commit to pubnative/redash that referenced this issue Sep 22, 2016
simo7 pushed a commit to pubnative/redash that referenced this issue Sep 22, 2016
Fix getredash#669: save fails when doing partial save of new query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants