[Sqlalchemy-tickets] Issue #4126: ColumnDefault.__repr__ does not cope with tuple in composite type
Brought to you by:
zzzeek
From: Nicolas C. <iss...@bi...> - 2017-10-31 11:04:16
|
New issue 4126: ColumnDefault.__repr__ does not cope with tuple in composite types. https://bitbucket.org/zzzeek/sqlalchemy/issues/4126/columndefault__repr__-does-not-cope-with Nicolas CANIART: We defined a composite type that is seen as a tuple on the Python side: a value with a unit. Some columns are defined with a default value like: `(0, Unit.ton)`. The __repr__ method of the ColumnDefault class cannot cope with such values as the tuple is intrepret as arguments to the format, not the actual value to format. Simple fix is to wrap the format argument with `(` and `, )` to make it safe. |