Skip to content

Commit 0922cb5

Browse files
committed
Made help_text attribute optional
Mongoengine dropped arbitrary metadata in its latest release (0.10.5) with commit c0e7f341cb16b740bcfe5d3536e64ac94a30a836 which breaks conversion to wtf fields. I have made this field optional inline with other optional attributes.
1 parent 32cce0d commit 0922cb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_mongoengine/wtf/orm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, converters=None):
4646
def convert(self, model, field, field_args):
4747
kwargs = {
4848
'label': getattr(field, 'verbose_name', field.name),
49-
'description': field.help_text or '',
49+
'description': getattr(field, 'help_text', None) or '',
5050
'validators': getattr(field, 'validators', None) or [],
5151
'filters': getattr(field, 'filters', None) or [],
5252
'default': field.default,

0 commit comments

Comments
 (0)