Skip to content

Commit 9074270

Browse files
committed
Enable FileField
1 parent 1f84fe6 commit 9074270

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

flask_mongoengine/db_fields.py

+1-14
Original file line numberDiff line numberDiff line change
@@ -577,20 +577,7 @@ class FileField(WtfFieldMixin, fields.FileField):
577577
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
578578
"""
579579

580-
DEFAULT_WTF_FIELD = wtf_fields.FileField if wtf_fields else None
581-
582-
def to_wtf_field(
583-
self,
584-
*,
585-
model: Optional[Type] = None,
586-
field_kwargs: Optional[dict] = None,
587-
):
588-
"""
589-
Protection from execution of :func:`to_wtf_field` in form generation.
590-
591-
:raises NotImplementedError: Field converter to WTForm Field not implemented.
592-
"""
593-
raise NotImplementedError("Field converter to WTForm Field not implemented.")
580+
DEFAULT_WTF_FIELD = custom_fields.MongoFileField if custom_fields else None
594581

595582

596583
class FloatField(WtfFieldMixin, fields.FloatField):

0 commit comments

Comments
 (0)