I can never seem to get the filter calls right when I want to check for null values.
Is this function unnecessary?
def sqla_false(field):
if field.type.__class__ == db.String:
return db.or_(field == None, field == '')
return field == None
How does sqlalchemy store unset fields? What if one of my wtforms forms sends a "" as a value for one of the fields, would NULL or "" be stored in the database when I call form.populate_obj(obj)?