Hack some poorly implemented serializer.

TODO: this breaks everything
This commit is contained in:
Gábor Barna 2016-10-28 11:52:38 +02:00
parent 2631c344dd
commit 70e6641e24

View File

@ -17,5 +17,8 @@ class Duck( Base ):
color = sa.Column( sa.String )
def __repr__(self):
return "<User(name='%s', fullname='%s', password='%s')>" % (
self.name, self.fullname, self.password)
return '{"duck_id": "'+ ( str( self.duck_id ) or '0' ) +'", "name": "'+ self.name +'", "color": "'+ self.color +'" }'
def __init__(self, name, color):
self.name = name
self.color = color