Add another sqlalchemy list type to be translated into json.

This commit is contained in:
Toshio Kuratomi 2008-03-03 07:18:29 -08:00
parent 95f1b8f1ba
commit 8ab79aab4f

View file

@ -106,7 +106,7 @@ def jsonify_sa_select_results(obj):
element.jsonProps = obj.jsonProps
return list(obj)
@jsonify.when("isinstance(obj, sqlalchemy.orm.attributes.InstrumentedAttribute)")
@jsonify.when("isinstance(obj, sqlalchemy.orm.attributes.InstrumentedAttribute) or isinstance(obj, sqlalchemy.ext.associationproxy._AssociationList)")
def jsonify_salist(obj):
'''Transform SQLAlchemy InstrumentedLists into json.