Repository navigation
add default coerce to any Select2Field - #2784
samialfattani wants to merge 2 commits into
Conversation
|
Why do you need to change typing? Do we need to change all other orm libraries? |
what do you mean? i'm not changing the typing. This PR just extract the right |
|
Sorry, let me be more specific. Why not editing |
the |
|
it is ready for review now, if it is hard to review because of many commits please let me know so i may squash them into a new PR and close this one |
07382e2 to
d63e092
Compare
|
all comments are resolved |
include all field types and cover all default end explicit coerce Update flask_admin/form/fields.py Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com> Update flask_admin/tests/sqla/test_form.py Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com> Update flask_admin/contrib/sqla/form.py Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com> Update flask_admin/contrib/sqla/form.py Co-authored-by: Lorenzo <lorenzo.cerreta@gmail.com> Refactor Select2Field coercion logic
7b6dd52 to
92f6052
Compare
run-time error is raised if Select2Field did'nt include
coerce=intin form_argsHere is how to replicate the error
This PR adds a default coerce function if it is not provided explicitly based on the Column's type
the added tests won't pass without changes in this PR