Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/employees/app/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask_appbuilder import ModelView
from flask_appbuilder.fieldwidgets import Select2Widget
from flask_appbuilder.models.sqla.interface import SQLAInterface
from wtforms.ext.sqlalchemy.fields import QuerySelectField
from wtforms_sqlalchemy.fields import QuerySelectField

from . import appbuilder, db
from .models import Benefit, Department, Employee, EmployeeHistory, Function
Expand Down
3 changes: 2 additions & 1 deletion flask_appbuilder/models/mongoengine/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def process(self, formdata, data=unset_value):
if marker in formdata:
self._should_delete = True

return super(MongoFileField, self).process(formdata, data)
# return super(MongoFileField, self).process(formdata, data)
return super().process(formdata, data)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawnzhu could you please include the return super().process(formdata, data, **kwargs) to check if it solve the issue? Thank you


def populate_obj(self, obj, name):
field = getattr(obj, name, None)
Expand Down
4 changes: 2 additions & 2 deletions flask_appbuilder/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def get_url(self, field):


# Fields
class FileUploadField(fields.TextField):
class FileUploadField(fields.StringField):
"""
Customizable file-upload field.

Saves file to configured path, handles updates and deletions.
Inherits from `TextField`, resulting filename will be stored as string.
Inherits from `StringField`, resulting filename will be stored as string.
"""

widget = BS3FileUploadFieldWidget()
Expand Down
4 changes: 0 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ werkzeug==1.0.1
# via
# flask
# flask-jwt-extended
wtforms==2.3.3
# via
# Flask-AppBuilder (setup.py)
# flask-wtf
zipp==3.5.0
# via importlib-metadata

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def desc():
# Cautious cap
"SQLAlchemy<1.5",
"sqlalchemy-utils>=0.32.21, <1",
"WTForms<3.0.0",
],
extras_require={
"jmespath": ["jmespath>=0.9.5"],
Expand Down