Skip to content

Commit

Permalink
fix field bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyong97 committed Jun 28, 2020
1 parent 36cfb1c commit 61ade72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_mdeditor/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class MDEditor(TextArea):

def __call__(self, field, **kwargs):
editor = current_app.extensions['mdeditor']
mapping_value = {"id": field.id, "name": field.name, "value":field.data}
mapping_value = {"id": field.id, "name": field.name, "value": field.data if field.data else '' }
return editor.load(**mapping_value)


Expand Down

0 comments on commit 61ade72

Please sign in to comment.