I have a SQLALchemy model with such a column:
updated_at = Column(DateTime, nullable=False, server_default=func.now(),
onupdate=func.now())
Which generates WSDL:
<xs:element name="updated_at" type="xs:dateTime" minOccurs="0"/>
In the update request updated_at
field is missing, and spyne maps its value to None
causing this:
IntegrityError: (IntegrityError) null value in column "updated_at" violates not-null constraint
'UPDATE subcsription SET updated_at=%(updated_at)s WHERE subcsription.id = %(subcsription_id)s' {'subcsription_id': 27, 'updated_at': None}
How can i set up spyne to skip the field at all when it is not passed in SOAP request?