-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
allow selection of dbs where csv can be uploaded to #5393
allow selection of dbs where csv can be uploaded to #5393
Conversation
c4bcdb6
to
bac9bdd
Compare
Codecov Report
@@ Coverage Diff @@
## master #5393 +/- ##
==========================================
+ Coverage 61.21% 61.21% +<.01%
==========================================
Files 373 373
Lines 23709 23710 +1
Branches 2750 2750
==========================================
+ Hits 14513 14514 +1
Misses 9181 9181
Partials 15 15
Continue to review full report at Codecov.
|
superset/forms.py
Outdated
@@ -50,7 +50,9 @@ def filter_not_empty_values(value): | |||
class CsvToDatabaseForm(DynamicForm): | |||
# pylint: disable=E0211 | |||
def all_db_items(): | |||
return db.session.query(models.Database) |
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 might be a good idea to rename this method as it's no longer all.
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.
Agree. Fixed
1e52d59
to
62cff2f
Compare
@john-bodley Done |
|
||
|
||
def upgrade(): | ||
op.add_column('dbs', sa.Column('allow_csv_upload', sa.Boolean(), nullable=True)) |
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.
What does a NULL value imply here?
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.
Removed.
62cff2f
to
e258898
Compare
e258898
to
239f752
Compare
(cherry picked from commit 7f8eaee)
Right now, all databases are listed when the user tries to upload to CSV.
This PR allows the administrator select which databases people can upload CSV to. I set it to True by default so there is no breakage upon deploy.
@john-bodley @mistercrunch