mixer
mixer copied to clipboard
Mixer should respect decimal presision on SQLAlchemy models
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.