Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixer should respect decimal presision on SQLAlchemy models #170

Open
pax0r opened this issue Aug 10, 2022 · 0 comments
Open

Mixer should respect decimal presision on SQLAlchemy models #170

pax0r opened this issue Aug 10, 2022 · 0 comments

Comments

@pax0r
Copy link

pax0r commented Aug 10, 2022

I have model with field defined like this:
Column(sa.Numeric(precision=9, scale=3), nullable=False)
and I am trying to use Mixer to put data into that model.
Sometimes it tries to insert larger values than allowed by this field which results with error:

sqlalchemy.exc.DataError: Mixer (<class 'test.Model'>): (psycopg2.errors.NumericValueOutOfRange) numeric field overflow
DETAIL:  A field with precision 9, scale 3 must round to an absolute value less than 10^6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant