-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
fix: schemas for upload API #29604
fix: schemas for upload API #29604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
635cb2f
to
1751d6a
Compare
@@ -993,7 +993,7 @@ def get_schema_access_for_file_upload( # pylint: disable=invalid-name | |||
self, g.user | |||
) | |||
allowed_databases += extra_allowed_databases | |||
return sorted(set(allowed_databases)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@betodealmeida Do you know why it was sorted before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was sorted so it can be displayed nicely in the UI, but since that's a UI-only concern we've been moving the sorting logic to the frontend. I'm going to update it next, for now this PR fixes only this because it's broken by returning a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the frontend change also happen in this PR to make it atomic? This would make the PR not only fix the list issue but also preserve the current sorted behavior. In other words, there would not be any side effect as the result of this PR except the fix.
1751d6a
to
f86d327
Compare
SUMMARY
Make sure
get_schema_access_for_file_upload
returns a set, so it can be used by the API.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Added unit test.
ADDITIONAL INFORMATION