Столкнулся со следующей проблемой:
Есть модель:
class Pattern(Declarative):
__tablename__ = 'patterns'
pk = Column(Integer, primary_key=True)
title = Column(String(30), nullable=False, unique=True)
image = Column(Text, nullable=False)
mask = Column(Text, nullable=False)
sign = Column(Text, nullable=False)
sign_coords = Column(Text, nullable=False)
heads = Column(Integer, nullable=False)
heads_coords = Column(Text, nullable=False)
caption = Column(Text, nullable=False)
added = Column(Boolean, nullable=False)
def __init__(self, title, image, mask, sign, sign_coords, heads,
heads_coords, caption, added):
self.title = title
self.image = image
self.mask = mask
self.sign = sign
self.sign_coords = json_encode(sign_coords)
self.heads = heads
self.heads_coords = json_encode(heads_coords)
self.caption = caption
self.added = added
Спасибо.