You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
class CsvToDatabaseForm(DynamicForm):
# pylint: disable=E0211
def csv_allowed_dbs() -> List[Database]: # type: ignore
csv_enabled_dbs = (
db.session.query(Database).filter_by(allow_csv_upload=True).all()
)
return [
csv_enabled_db
for csv_enabled_db in csv_enabled_dbs
if CsvToDatabaseForm.at_least_one_schema_is_allowed(csv_enabled_db)
]
There's unnecessary duplication here between CSV and other forms.
Describe the solution you'd like
We should abstract this into a class UploadToDatabaseForm(DynamicForm) with all the repeated boilerplate and then extend those into class CsvToDatabaseForm(UploadToDatabaseForm), class ExcelToDatabaseForm(UploadToDatabaseForm) etc.
Is your feature request related to a problem? Please describe.
There's unnecessary duplication here between CSV and other forms.
Describe the solution you'd like
We should abstract this into a class
UploadToDatabaseForm(DynamicForm)
with all the repeated boilerplate and then extend those into classCsvToDatabaseForm(UploadToDatabaseForm)
, classExcelToDatabaseForm(UploadToDatabaseForm)
etc.cc: @villebro
The text was updated successfully, but these errors were encountered: