Open
Description
I have a sqlalchemy class with a postgres money field
budget = db.Column(sqlalchemy.dialects.postgresql.MONEY)
I'm using the SQLAlchemyAutoSchema to dump a record of containing this, but it is failing with the error
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
I'm using marshmallow-sqlalchemy 0.23.1 and SQLAlchemy 1.3.15, and as far as I understand it, the MONEY type was added marshmallow-code/marshmallow-sqlalchemy#218
My completely uneducated guess is that the SQLA_TYPE_MAPPING is just trying to interpret the value as a decimal? However, the value in the query result object is a string, including the currency symbol. e.g. '$800.00'
Metadata
Metadata
Assignees
Labels
No labels