dpgaspar / Flask-AppBuilder

Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
BSD 3-Clause "New" or "Revised" License
4.71k stars 1.36k forks source link

fix: respect scale for SQL type NUMERIC #2159

Open goerch opened 1 year ago

goerch commented 1 year ago

Description

When testing with different SQL numeric types like NUMERIC, NUMERIC(14, 2), NUMERIC(14, 4) we noticed that the views always show two decimal places. This fix respects the SQL schema.

ADDITIONAL INFORMATION

codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (59db85d) 79.31% compared to head (f727f2a) 79.31%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2159 +/- ## ======================================= Coverage 79.31% 79.31% ======================================= Files 72 72 Lines 8974 8970 -4 ======================================= - Hits 7118 7115 -3 + Misses 1856 1855 -1 ``` | [Flag](https://app.codecov.io/gh/dpgaspar/Flask-AppBuilder/pull/2159/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Vaz+Gaspar) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/dpgaspar/Flask-AppBuilder/pull/2159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Vaz+Gaspar) | `79.31% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+Vaz+Gaspar#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.